Data Definition Language
CREATE
CREATE TABLE [table name] ( [column definitions] ) [table parameters]
CREATE TABLE employees (
id INTEGER PRIMARY KEY,
first_name VARCHAR(50) not null,
last_name VARCHAR(75) not null,
mid_name VARCHAR(50) not null,
dateofbirth DATE not null
);
ALTER
ALTER objecttype objectname parameters.
ALTER TABLE sink ADD bubbles INTEGER;
ALTER TABLE sink DROP COLUMN bubbles;
DROP
DROP objecttype objectname.
TRUNCATE
- The
TRUNCATE
statement is used to delete all data from a table. It's much faster than DELETE
.
TRUNCATE TABLE table_name;