This is a pretty basic concept, but for some reason I forgot the power of parentheses:

To select people with first name equal to "Jason" and last name equal to "Tom" or "Ting":

SELECT * FROM people WHERE
first_name='Jason'
AND (last_name='Tom' OR last_name='Ting')

Leave a Reply