Multiple choice technology databases

With SQL, how do you select all the records from a table named 'Persons' where the value of the column 'FirstName' starts with an 'a'?

  1. SELECT * FROM Persons WHERE FirstName LIKE 'a%'

  2. SELECT * FROM Persons WHERE FirstName LIKE '%a'

  3. SELECT * FROM Persons WHERE FirstName='a'

  4. SELECT * FROM Persons WHERE FirstName='%a%'

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

The LIKE operator with 'a%' matches any string starting with 'a'. Option B would end with 'a', Option C is an exact match, and Option D would contain 'a' anywhere.