DB2 graphic  QMF Version 8

Selecting rows If either condition is true

If you want to select rows that meet either condition, use the OR keyword to connect them.

The following query displays the same columns in the Q.STAFF table, but selects employees who have either 10 years of service or earn more than $20,000.00.

SELECT ID, NAME, YEARS, SALARY
  FROM Q.STAFF
  WHERE YEARS = 10
    OR SALARY > 20000


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