SQL DDL Statements
Data Definition Language — CREATE TABLE, ALTER TABLE, DROP TABLE, TRUNCATE, CREATE INDEX. This category documents 25 SQL ddl statements entries, and each page gives you the full syntax, the parameter list, the return value, and a runnable example tested against MySQL, PostgreSQL, SQL Server, and SQLite. The entries are: CREATE TABLE, ALTER TABLE, DROP TABLE, TRUNCATE TABLE, RENAME TABLE, CREATE DATABASE, DROP DATABASE, CREATE SCHEMA, ALTER TABLE ADD COLUMN, ALTER TABLE DROP COLUMN, ALTER TABLE MODIFY COLUMN, ALTER TABLE RENAME COLUMN, COMMENT ON, USE, CREATE TYPE, CREATE SEQUENCE (ANSI), DISABLE / ENABLE TRIGGER, IF EXISTS / IF NOT EXISTS, TRIGGER CREATE / DROP, TEMPORARY TABLE, ALTER TABLE RENAME, COMPUTED / CALCULATED COLUMN, ALTER TABLE SWITCH (Partition Switch), CREATE TABLE AS (CTAS), DECLARE Table Variable (SQL Server). Not sure where to start? CREATE TABLE and ALTER TABLE are the most commonly used entries in this category. You can also search across every category from the search page, browse the complete A–Z index, or try any of these statements live in the SQL playground.