SQL Tutorial

SQL tutorial section provides you with clear, concise and easy-to-understand SQL. In this section, you will learn how to write complex SQL queries 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).

So…

What can you 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, and indexes 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 is the most popular free and open source database management system. If you are developing web applications using open source frameworks, it is highly recommended that you use MySQL because it is completely free and easy to start with.
  • Microsoft SQL Server is the 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-scale desktop and web applications. In addition, SQL Server Expression Edition is free which you can download from Microsoft website.
  • Oracle is an enterprise database management system product of Oracle. Oracle Database is considered as one of the most sophisticated object-relational database management systems. You can download and install it from Oracle’s website free for educational purposes.

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

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 the SELECT statement with various clauses and operators. Furthermore, we show you how to manipulate data such inserting, updating and deleting.

Advanced SQL

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

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.