TRUNCATE TABLE
TRUNCATE TABLE is a SQL statement in the DDL Statements category. Removes ALL rows from a table quickly. Unlike DELETE, cannot be rolled back in most databases. Resets AUTO_INCREMENT. The syntax is TRUNCATE TABLE table_name;. It returns none (rows removed). A typical example: TRUNCATE TABLE log_entries; -- Faster than DELETE FROM log_entries, but cannot be rolled back A close relative is CREATE TABLE, which creates a new table in the database with specified columns, data types, and constraints. A close relative is ALTER TABLE, which modifies an existing table: add/drop columns, modify data types, rename, add/drop constraints. A close relative is DROP TABLE, which permanently removes a table and all its data from the database. Cannot be undone. More about this category: Data Definition Language — CREATE TABLE, ALTER TABLE, DROP TABLE, TRUNCATE, CREATE INDEX. Related DDL Statements entries: CREATE TABLE, ALTER TABLE, DROP TABLE, RENAME TABLE, CREATE DATABASE, DROP DATABASE, CREATE SCHEMA, ALTER TABLE ADD COLUMN.