Multiple choice technology databases

Select the right syntax to delete all the rows from the table employee_Details but retain the table :

  1. delete * from employee_Details

  2. delete from employee_Details

  3. truncate table employee_Details

  4. drop table employee_Details

Reveal answer Fill a bubble to check yourself
B,C Correct answer
Explanation

Both DELETE FROM table (without WHERE clause) and TRUNCATE TABLE table remove all rows while keeping the table structure. DELETE is logged and can be rolled back, while TRUNCATE is a DDL operation that's faster but cannot be rolled back. 'DELETE * FROM' is incorrect syntax, and DROP TABLE removes the entire table structure.