Multiple choice technology databases

Delete from Employee where grade = ‘Y’” deletes

  1. All rows of the Employee table

  2. Rows of the Employee table where the set grade is ‘Y’

  3. Delete 1 row

  4. Nothing will be deleted

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

The DELETE statement 'DELETE FROM Employee WHERE grade = 'Y'' will delete ALL rows from the Employee table where the grade column equals 'Y'. If 50 rows have grade='Y', all 50 are deleted. It does not delete all rows in the table, does not delete exactly 1 row, and it definitely deletes something (rows matching the condition). DELETE, like UPDATE, operates on the entire rowset that matches the WHERE condition.