Which SQL command removes all rows from a table while retaining its table structure?
Options
-
A.
DROP
-
B.
TRUNCATE
-
C.
ALTER
-
D.
More than one of the above
-
E.
None of the above
Correct Answer (Detailed Explanation is Below)
B.
TRUNCATE
Detailed Explanation
- TRUNCATE TABLE removes all rows from a table.
- The table structure remains available for future use.
- It is generally classified as a DDL command.
OOps! You are currently offline.