Short cuts for typing search conditions

Using the short form BETWEEN

SQL has two short forms for typing in search conditions. The first, BETWEEN, is used when you are looking for a range of values. For example,

SELECT emp_lname, birth_date
FROM employee
WHERE birth_date BETWEEN '1964-1-1'
AND '1965-3-31'

is equivalent to:

SELECT emp_lname, birth_date
FROM employee
WHERE birth_date >= '1964-1-1'
AND birth_date <= '1965-3-31'

Using the short form IN

The second short form, IN, may be used when looking for one of a number of values. The command

SELECT emp_lname, emp_id
FROM employee
WHERE emp_lname IN ('Yeung','Bucceri','Charlton')

means the same as:

SELECT emp_lname, emp_id
FROM employee
WHERE emp_lname = 'Yeung'
OR emp_lname = 'Bucceri'
OR emp_lname = 'Charlton'