A SQL SELECT statement consists of a target list and a qualification. The target list is a list of columns to be returned and the qualification is the part that specifies conditions which must be met in order to be returned. This is performed by the WHERE clause. It can be connected with the logical boolean operators: AND, OR, and NOT.

Example 4-19. Select using Boolean Operators

  SELECT title, author_id, cpright_date
    FROM book
   WHERE author_id =110
      OR cpright_date <= '1980-1-1';

This leads to the result:

            title            | author_id | cpright_date
-----------------------------+-----------+--------------
 The Cat in the Hat          |       110 | 1972-04-29
 Bartholomew and the Oobleck |       110 | 1997-02-01
 The Velveteen Rabbit        |       220 | 1958-02-06
(3 rows)