Detailed explanation and options for the selected question.
Which SQL command is used to delete all rows from a table but retain its structure?
A.
TRUNCATE TABLE
B.
DELETE FROM
C.
DROP TABLE
D.
CLEAR TABLE
Explanation:
TRUNCATE TABLE deletes all rows but retains the table structure. DELETE FROM removes rows but retains data logs, DROP TABLE deletes the table, and CLEAR TABLE is invalid.