truncate command
-
deletes data from table but keeps table structure
-
deletes data as well table structure
-
drops table
-
none of the above
Reveal answer
Fill a bubble to check yourself
A
Correct answer
Explanation
TRUNCATE removes all rows from a table but preserves the table structure and associated objects (indexes, constraints). Unlike DELETE, TRUNCATE is DDL (cannot be rolled back) and is faster for removing all data.
AI explanation
TRUNCATE removes all rows from a table quickly (typically by deallocating data pages) but leaves the table's structure, columns, and constraints intact, so you can keep inserting into the same table afterward. It's different from DROP, which removes the table structure entirely, or a row-by-row DELETE, which is slower but otherwise similar in effect on structure.