QuestionQ80

VerifiedManipulating Data

Review the structures of the EMPLOYEES and NEW_EMPLOYEES tables:

Question Image

Which DELETE statement is valid?

Explanation

Oracle's DELETE statement syntax never allows an asterisk after the DELETE keyword (the correct form is DELETE FROM table ... or DELETE table ...), so any statement written as DELETE * FROM ... is invalid; likewise a character literal must be enclosed in single quotation marks, so an unquoted value such as Carrey is treated as an invalid identifier and causes an error. A DELETE statement that uses a subquery in its WHERE clause, as in DELETE FROM employees WHERE employee_id = (SELECT employee_id FROM employees), is valid Oracle SQL syntax.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!