What would you like to know more about?

Search Terms

Text

Text is always placed in single quotes.

SELECT Contact_ID, Display_Name, Date_of_Birth 
FROM Contacts 
WHERE Last_Name = 'Smith'

Dates

Dates are always placed in single-quotes formatted in the following fashion:

Date only: 'yyyy-mm-dd'

Date and time: 'yyyy-mm-dd hh:mm:ss'

SELECT Contact_ID, Display_Name, Date_of_Birth 
FROM Contacts 
WHERE Date_of_Birth = '1994-01-01'

For more on Comparisons and Values, see SQL Comparisons.