CBSE Class 12 Computer Science Question 17 of 79

Table Creation and Data Manipulation Commands — Question 11

Back to all questions
11
Question

Question 11

Identify the error :

DELETE ALL FROM TABLE EMPL ;
Answer

The statement DELETE ALL FROM TABLE EMPL; is in error due to the misuse of the keyword ALL and the unnecessary inclusion of TABLE before the table name. In SQL, the syntax of DELETE statement is :

DELETE FROM  <TABLENAME>
[ WHERE <PREDICATE> ] ;

According to this syntax, the correct command to remove all the contents of EMPL table is :

DELETE FROM EMPL ;