Which of the following SQL commands is used to delete data from a table?
-
Remove
-
Truncate
-
Delete
-
Drop
C
Correct answer
Explanation
The Delete statement is used to delete all or selected rows from a table. It is a part of DML or Data Manipulation Language part of SQL. Its syntax is delete from tablename where conditionexample: Delete from students where marks>50. If the 'Where clause' is omitted from the above statement, it will delete all the records from a table.