SQL Tutorial for SQL Server

Welcome to Essential SQL Online SQL Tutorial. Use this page to get started learning SQL.

SQL Tutorial Overview

Use SQL (Structured Query Language) to query a relational database. You use SQL to “tell” the database what results that you would like to see.

Since the database stores its data in tables, which are made up of rows and columns, a typical SQL statement’s purpose is to describe what table to query and which columns to return.

SELECT FirstName, LastName FROM Person.Person
/* Answer */
SELECT FirstName, LastName
FROM   Person.Person

In this SQL Tutorial example we are querying the Person table and return each person’s first and last name.

You can try the query for yourself.  Just click Run Query

In fact, wherever, you see the box above, you can run the statement shown, or modify it to experiment and learn.

Now and then, we’ll ask you to write SQL! When you get stumped click on Show Answer to reveal what we wrote for the SQL Tutorial.

Tutorial Topics

Click on a topic to the right to view it. You can start from the top and do the topics in sequence, of if you wish, just skip ahead to a topic you want to learn.

The main topics covered are:

In either case, the SQL tutorial topics are just the right size for you to learn a concept within several minutes.

In addition to the topics there is also a SQL Server Reference.

Additional Resources

In addition to what we have here in our SQL tutorial, I would also recommend these popular articles from our blog:

>