Computer Science

Identify the error :

DELETE ALL FROM TABLE EMPL ;

DDL & DML

2 Likes

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 ;

Answered By

2 Likes


Related Questions