DB2 graphic  QMF Version 8

Selecting rows using conditions

You can specify any of the following conditions when you select rows:

=
Equal to
>
Greater than
> =
Greater than or equal to
<
Less than
< =
Less than or equal to
¬=
Not equal to
<>
Not equal to

The following query selects employees who earn a commission greater than or equal to $1,000.00.

SELECT ID, COMM
  FROM Q.STAFF
  WHERE COMM >= 1000

The following query selects employees who earn a commission of at least $170.00, but not more than $220.00.

                 
SELECT ID, COMM
  FROM Q.STAFF
  WHERE COMM BETWEEN 170 AND 220

For more information about the BETWEEN keyword, see the SQL reference manual for your database management system.


Go to the previous page Go to the next page

Downloads | Library | Support | Support Policy | Terms of use | Feedback
Copyright IBM Corporation 1982,2004 Copyright IBM Corporation 1982, 2004
timestamp Last updated: March, 2004