The email with the example script is on it’s way!

To get started, you will need to have access to your own SQL Server.  If you need to install a version–you are in luck–the 2016 dev version is now free and you can get started there.  If you have problems installing, let me know.  I hope to get a video up shortly to document the steps.

If a few minutes have passed and you don’t have the email, please check your spam/junk folder.  Not everyone appreciate SQL the way you do.  🙂


Setup the LearnSQL Database

  1. Ensure SQL Server has been installed and you have unpackaged the zip files in the email.
  2. Create a new database through SQL Server Management Studio (SSMS) by connecting to a test database in object explorer and right clicking New Database.
    1. Enter the name LearnSQL in the database name text box.
    2. Click OK.
    3. The new database will be created
  3. Open and execute (run) the file CreateObjects SQLServer.sql. This file contains the scripts needed to create all the example tables.
  4. Open and execute the file InsertQueries SQLServer.sql. This file will insert all the sample records we will use.

There is another file, InsertOptionalValues.sql that can be used once you get to lesson 11, but it is not recommended you run InsertOptionalValues.sql until you get to that chapter.

The file SQLServerQueries has a copy of all the queries used in the book.  You can highlight just a single query and run it to see the results.