User's Guide
Part II. Tutorials
Chapter 7. Selecting Data from Database TablesSQL 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_dateFROM employeeWHERE birth_date BETWEEN '1965-1-1'AND '1965-3-31'
is equivalent to:
SELECT emp_lname, birth_dateFROM employeeWHERE birth_date >= '1965-1-1'AND birth_date <= '1965-3-31'
The second short form, IN, may be used when looking for one of a number of values. The command
SELECT emp_lname, emp_idFROM employeeWHERE emp_lname IN ('yeung','bucceri','charlton')
means the same as:
SELECT emp_lname, emp_idFROM employeeWHERE emp_lname = 'yeung'OR emp_lname = 'bucceri'OR emp_lname = 'charlton'