SQL Tutorial

Learning SQL

This SQL tutorial gets you up to speed quickly.

Each page comes with real-world SQL examples.

Once you know SQL you can query and maintain databases.

This tutorial is designed for you, and it's free. Enjoy!

SQL

SQL Examples

#

In this tutorial, each SQL example solves a specific problem.
Here's an example.

SUPPLIER
Id
CompanyName
ContactName
City
Country
Phone
Fax
Problem: List all suppliers in reverse alphabetical order.
SELECT CompanyName, ContactName, City, Country
  FROM Supplier
 ORDER BY CompanyName DESC

This problem is solved with the given SQL query.
The table(s) on the right help with visualizing the query.

SQL Editor

Each SQL example has a  Try It live  button which opens the SQL Editor where you can change the SQL and run your queries against a live database.

SQL Editor

Tip:  The editor accepts SELECT, UPDATE, INSERT, and DELETE operations. Operations that change data will execute and are then rolled back (undone) to maintain integrity of the database..


SQL for Beginners

If you're a beginner, then this tutorial is for you.

It covers the basics in a simple and easy-to-understand manner.

The SQL editor lets you run the SQL with instant feedback -- a great learning experience.


SQL for Experienced Developers

If you are an experienced developer, then this tutorial is also for you.

Our tutorial covers all SQL queries with clauses, keywords, functions and more.

If you sometimes forget a SQL detail or syntax, then this Guide is for you!


You may also like

Each page ends with a 'You may also like' section with links to related topics, like so:



Guides