Multiple choice sql

With SQL, how can you delete the records where the "FirstName" is "Peter" in the Persons Table?

  1. DELETE FROM Persons WHERE FirstName = 'Peter'

  2. DELETE ROW FirstName='Peter' FROM Persons

  3. DELETE FirstName='Peter' FROM Persons

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

DELETE FROM table WHERE condition removes rows matching the condition. The WHERE clause is essential to specify which rows to delete.

AI explanation

The correct SQL syntax to remove rows matching a condition is DELETE FROM table_name WHERE condition; — so DELETE FROM Persons WHERE FirstName = 'Peter' is valid and correct. The other options invert the clause order into invalid syntax: DELETE ROW FirstName='Peter' FROM Persons and DELETE FirstName='Peter' FROM Persons are not valid SQL — DELETE never takes a column=value clause directly after the keyword; it must go in a WHERE clause after specifying the table.