With SQL, how do you select all the records from a table named “Persons” where the value of the column “FirstName” ends with an “a”?
(a) SELECT * FROM Persons WHERE FirstName=’a’
(b) SELECT * FROM Persons WHERE FirstName LIKE ‘a%’
(c) SELECT * FROM Persons WHERE FirstName LIKE ‘%a’
(d) SELECT * FROM Persons WHERE FirstName=’%a%’
This question was addressed to me in an internship interview.
Enquiry is from Basic SQL topic in portion Laying the Foundation of SQL Server