Beginning Learning SQL Server (2008 R2 or 2012)

For SQL Server 2008 R2 and SQL Server 2012 , going in it to it with no knowledge of what exactly SQL is can be kind of intimidating. I know this first hand as my job – in working with my current job, I had little no experience with Microsoft SQL – I had worked with MySQL in the past, but let me be the first, and certainly not the last to tell you that there is a massive difference between the two. SQL has been around for quite some time and is more or less an abbreviation. SQL (said something like “see kwul”) means Structured Query Language. If you have come here to learn the absolute basics of what SQL is, sadly I am not going to help much. I suggest Wikipedia for all that info – but I am just going to go over some basics.

Installing SQL – before we start with this entire tutorial on how exactly I learned SQL, I would suggest you build yourself a SQL Server instance. You need to have a version of SQL that you can work with, a copy of some form of Windows (Windows Server 2008 or 2008 R2 would work best) and maybe stick it in a VM using something like VMware Player or VirtualBox. If you are on a Linux host, you’ll want to use Virtualbox – either available from your repository (might be outdated) or else straight from If you feel confident that you can learn SQL in 120 days, I believe Microsoft has a 120 day Trial for SQL Server 2012 on their site.

Anyway – for all these examples in here, you are going to need a full working copy of SQL Server (at least Standard, if not Enterprise) and preferably not in a production environment – hence why I would just suggest making a VM to house it – if you’re not doing heavy querying or have it taking massive CPU hits, a VM will work fine for setting this up. I’ve found that using a VM with 2 gigs of RAM does fine, provided this is just a box for learning and not a production box. Obviously if you are making a production box, you should probably consider more than a VM and more than 2 gigs of RAM.

The VM I created has 4 procs and 2 gigs of RAM – I’ve found that this will suffice for our learning sessions.

I’m going to assume that you know how to install Windows in a virtual environment and get it licensed properly. For all these examples in the coming weeks and months, I will be using Windows Server 2008 R2 Foundation with SQL Server 2012. For SQL Server 2008 and 2012, the querying language has not changed that much, and therefore all the queries that I will stick on here will work just fine in either 2008 R2 or 2012.

Alright, on to installing SQL. I’m not going to walk you through every last detail about installing SQL because I don’t know which environment you are in – I suggested using a VM, but perhaps you already have a stage server you can use. In any event, I would highly suggest reading through and following this guide to get your SQL instance all set up and running. This guide will help you set up a config that is good for your specific setting.

Once that is set up, you can go on to the next step – which is called “Creating our Learning Database”