Multiple choice technology databases

With SQL, how do you select all the records from a table named "Persons" where the "FirstName" is "Peter" and the "LastName" is "Jackson"?

  1. SELECT * FROM Persons WHERE FirstName='Peter' AND LastName='Jackson'

  2. SELECT FirstName='Peter', LastName='Jackson' FROM Persons

  3. SELECT * FROM Persons WHERE FirstName<>'Peter' AND LastName<>'Jackson'

  4. SELECT * FROM Persons WHERE FirstName='Jackson' AND LastName='Peter'

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

The standard SQL syntax to filter records based on multiple conditions is to use the WHERE clause combined with the AND operator. The correct query specifies both FirstName and LastName conditions correctly, whereas the other options use incorrect syntax or swap the values.