SQL Reference for Beginners

This page contains direct links to SQL tutorials and reference articles for beginners.

Tutorials

Data Definition Language (DDL)

Data Definition Language (DDL) is a subset of SQL that deals with creating and maintaining database objects such as tables, views, stored procedures, etc.

The actual syntax can vary quite widely between RDBMSs, but the articles listed here do their best to cover the commonly used features in most of the major RDBMSs.

Common SQL Statements:

Common tasks:

Data Manipulation Language (DML)

Data Manipulation Language (DML) is the part of SQL that deals with reading, writing, and updating data.

These are sometimes separated into “read DML” vs “write DML”, in order to distinguish between those statements that simply read the data and those that write, update, or delete data. Some also refer to the “read DML” statements as DQL for Data Query Language.

Most of these statements work in a similar way across most of the major RDBMSs for most of the commonly performed tasks. However, there can be differences in some cases, depending on the task being performed.

Aggregate Functions

Aggregate functions return a single result row based on groups of rows, rather than on single rows. They can appear in SELECT lists and in ORDER BY and HAVING clauses. They are often used with the GROUP BY clause in a SELECT statement.

SQL Operators

In SQL, an operator is a special character or keyword specifying an action that is performed on one or more expressions.

Comparison Operators

Logical Operators

Set Operators

SQL Operator Reference