With SQL, how can you delete the records where the "FirstName" is "Peter" in the Persons Table?
Reveal answer
Fill a bubble to check yourself
With SQL, how can you delete the records where the "FirstName" is "Peter" in the Persons Table?
DELETE FROM Persons WHERE FirstName = 'Peter'
DELETE ROW FirstName='Peter' FROM Persons
DELETE FirstName='Peter' FROM Persons
DELETE FROM table WHERE condition removes rows matching the condition. The WHERE clause is essential to specify which rows to delete.
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.