Data Definition Language: CREATE Statements
Data Definition Language: CREATE Statements
CREATE statements
DROP statements
A DROP statement in SQL removes an object from a relational database management system
(RDBMS). The types of objects that can be dropped depends on which RDBMS is being
used, but most support the dropping of tables, users, and databases. Some systems (such as
PostgreSQL) allow DROP and other DDL commands to occur inside of a transaction and thus
be rolled back. The typical usage is simply:
For example, the command to drop a table named employees would be:
DROP employees;
ALTER statements
An ALTER statement in SQL changes the properties of an object inside of a relational database
management system (RDBMS). The types of objects that can be altered depends on which
RDBMS is being used. The typical usage is:
For example, the command to add (then remove) a column named bubbles for an existing
table named sink would be: