Multiple choice technology databases

If emp table is having 10 rows, which of the below queries executes successfully without error? A) delete from emp; B) delete emp; C) delete emp where 1=1;

  1. A

  2. B

  3. C

  4. None

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

All three DELETE statements are syntactically valid in Oracle. 'DELETE FROM emp;' is the standard syntax. 'DELETE emp;' is a valid shorthand (FROM is optional). 'DELETE FROM emp WHERE 1=1;' is valid but the WHERE clause is redundant since 1=1 is always true. All three would delete all 10 rows successfully.