This page contains direct links to SQL tutorials and reference articles for beginners.
Tutorials
- SQL Tutorial for Beginners
- SQL Joins Tutorial
- SQL Transactions Tutorial
- Database Tutorial
- Basic SQL Queries (examples)
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:
- SQL
CREATE TABLE
for Beginners - SQL
ALTER TABLE
for Beginners - SQL
DROP COLUMN
for Beginners - SQL
DROP TABLE
for Beginners
Common tasks:
- Create a Relationship in SQL
- Add a Column to a Table in SQL
- How to Rename a Column in SQL
- How to Rename a Table in SQL
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.
- SQL
SELECT
for Beginners - SQL
ORDER BY
Clause for Beginners - SQL
GROUP BY
Clause for Beginners - SQL
HAVING
Clause for Beginners - SQL
DELETE
for Beginners - SQL
UPDATE
for Beginners - SQL
INSERT
for Beginners
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
AVG()
for Beginners - SQL
COUNT()
for Beginners - SQL
MAX()
for Beginners - SQL
MIN()
for Beginners - SQL
SUM()
for Beginners
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
- SQL Equals (
=
) Operator for Beginners - SQL Less Than (
<
) Operator for Beginners - SQL Less Than or Equal To (
<=
) Operator for Beginners - SQL Not Equal To (
!=
) Operator for Beginners
Logical Operators
- SQL
AND
Operator for Beginners - SQL
BETWEEN
Operator for Beginners - SQL
EXISTS
Operator for Beginners - SQL
IN
Operator for Beginners - SQL
LIKE
Operator for Beginners - SQL
NOT
Operator for Beginners - SQL
OR
Operator for Beginners
Set Operators
- SQL
EXCEPT
Operator (SQL Server) - SQL
INTERSECT
Operator (SQL Server) - SQL
UNION
Clause for Beginners
SQL Operator Reference
- SQL Operators (full list)
- 12 Commonly Used Operators in SQL