Which of the following SQL statements is correct?
-
TRUNCATE Sales TABLE
-
TRUNCATE * FROM TABLE Sales
-
TRUNCATE TABLE Sales
-
All the above
The correct SQL syntax for removing all rows from a table is TRUNCATE TABLE followed by the table name. This command quickly deletes all data while keeping the table structure intact. Options A and B use incorrect syntax, and D cannot be correct since only one syntax is proper.
The correct SQL syntax for removing all rows from a table (while keeping its structure) is TRUNCATE TABLE table_name — e.g., TRUNCATE TABLE Sales. "TRUNCATE Sales TABLE" and "TRUNCATE * FROM TABLE Sales" both have invalid word order/syntax that isn't accepted by any SQL dialect (the asterisk/FROM pattern belongs to SELECT/DELETE, not TRUNCATE, and TRUNCATE never takes a wildcard column list). "All the above" is wrong since only one of the three is syntactically valid. TRUNCATE TABLE Sales is the only correct statement.