SQL Tutorial

SQL tutorial section provides clear, concise and easy to understand SQL tutorials. In this section, you will learn how to write complex SQL query with practical examples. If you don’t know anything about SQL, this SQL tutorial is an excellent start.

Let’s answer a simple but important question.

What is SQL?

  • SQL stands for Structured Query Language.
  • SQL is pronounced as /ˌɛs.kjuːˈɛl/
  • SQL is designed to manipulate data in Relational Database Management System (RDBMS).


What can I do with SQL?

With SQL you can:

  • Manipulating data including querying and modifying data using data manipulation language (DML).
  • Managing database objects such as tables, views, indexes, etc using data definition language (DDL).
  • Granting or revoking privileges to users using data control language (DCL).

Before you start…

Before you start learning SQL, it is important to have a good database management system to practice. These are common database management systems that you should consider:

  • MySQL: it is the most popular free and open source database management system. If you are developing web application using open source frameworks, it is highly recommended to use MySQL because it is completely free and easy to start with.
  • Microsoft SQL Server: a Microsoft’s database product which is widely used in corporate environments. If you are working for a corporate, it makes sense to use Microsoft SQL Server as a tool to practice with SQL. Microsoft offers developers and database administrators SQL Server Express Edition that is ideal for learning and developing small desktop and web applications. In addition, SQL Server Expression Edition is free which you can download from Microsoft website.
  • Oracle: it is an enterprise database management system product of Oracle. Oracle database is considered as one of the most sophisticated object-relational database management system. You can download and install it from Oracle’s website free for educational purposes.

And there are many more such as PostgreSQL, IBM DB2 and Sybase, just name a few.

In order to help you get the most out of each SQL tutorial, we also provide you with a SQL sample database so you can download and load it into your database management system. The sample database is available in MySQL, Microsoft SQL Server and Microsoft Access.

Basic SQL Tutorial

Gives you basic data selection techniques using SELECT statement with various clauses and operators. Then we show you how to insert, update and delete data in database tables.

Advanced SQL

Provides advanced data selection techniques that involve multiple tables with complex conditions. In addition, we will also discuss about common SQL constraints that help you enforce data integrity automatically.

Working with Database Objects

SQL database definition language allows you to create, change or remove various kinds of database objects such as tables, views, indexes.

SQL Tutorial References

If you want to have a quick reference of SQL statements, you can download our printable SQL Cheat Sheet.