TRUNCATE TABLE

Removes all rows from a table but keeps the table structure.

sql
TRUNCATE TABLE temp_data;

When to use

The study guide's exam tip places it between the two: DELETE removes data, DROP removes the structure, and TRUNCATE removes all rows but keeps the structure.

See Read 01.

Appears in

No references yet.