SQL
External
- Learning SQL, 3rd Edition by Alan Beaulieu
Internal
Overview
This article documents standard SQL. For database-specific extensions, we'll link to the databases-specific DML operations page.
SQL is a non-procedural language TODO: this
Terms
Relational Database Terminology
In a relational model, data is stored in a set of tables, also known as relations. Within a relation, data is organized in rows (records) and columns. Each row describes an entity. Each is uniquely identified by a primary key. The rows may contain columns that are copies of other tables' primary keys. These are knowns as foreign keys and are used in joining related data together.
Also see:
Result Set
The result of an SQL query. It is logically equivalent with a non-persistent table.
View
SQL Schema Statements (DDL)
- Refactor PostgreSQL DDL Operations and surface in "Standard SQL" everything that can be handled with standard SQL.
- Refactor MySQL DDL Operations and surface in "Standard SQL" everything that can be handled with standard SQL.
CREATE
CREATE TABLE
ALTER TABLE
SQL Data Statements (DML)
Refactor PostgreSQL DML Operations and surface in "Standard SQL" everything that can be handled with standard SQL.
INSERT
UPDATE
UPDATE WHERE
DELETE
DELETE WHERE
Queries with SELECT
SQL Transaction Statements
Transactions.
Data Types
- SQL data types
- Database-specific data types
- Working with different data types
- Conversion functions
SQL NULL
NULL
in conditions.