TABLE is the core relational object that stores data in a database. It appears in Data Definition Language (DDL) commands such as CREATE TABLE, ALTER TABLE, and DROP TABLE, and in Data Manipulation Language (DML) queries like SELECT, INSERT, UPDATE, and DELETE. A table consists of one or more columns, each with a data type, optional constraints, and optional default values. Rows represent individual records. When you define a table you also implicitly define its metadata, including column order, constraints, indexes, and storage parameters. Proper table design underpins performance, integrity, and scalability. Caveats: column order cannot be changed easily in many systems, most databases lock or block writes during structural changes, and dropping a table is irreversible unless wrapped in a transaction or backup.
SQL-86 (ANSI X3.135-1986)
A table only needs a name and at least one column with a data type, but best practice is to include a primary key.
Use ALTER TABLE old_name RENAME TO new_name; in dialects like PostgreSQL and SQLite. In MySQL use RENAME TABLE.
Use TEMP or TEMPORARY tables for intermediate results in complex reporting or ETL jobs to avoid polluting the main schema.
All indexes, constraints, and triggers tied to the table are automatically removed along with the table definition and data.