Which statement correctly describes the difference between DELETE and TRUNCATE?
Options
-
A.
DELETE supports a WHERE clause, whereas TRUNCATE removes all rows
-
B.
TRUNCATE removes the table definition, whereas DELETE removes the table
-
C.
DELETE can only remove one record, whereas TRUNCATE removes one column
-
D.
More than one of the above
-
E.
None of the above
Correct Answer (Detailed Explanation is Below)
A.
DELETE supports a WHERE clause, whereas TRUNCATE removes all rows
Detailed Explanation
- DELETE: Can remove selected rows using a WHERE clause or all rows without it.
- TRUNCATE: Removes all rows without using a WHERE clause.
- Both retain the table definition, unlike DROP TABLE.