DB2 graphic  QMF Version 8

Selecting rows If both conditions are true

If you want to select rows that meet both conditions, use the AND keyword to connect them.

The following query displays the ID, NAME, YEARS, and SALARY of employees in the Q.STAFF table that have both 10 years of service and earn more than $20,000.

SELECT ID, NAME, YEARS, SALARY
  FROM Q.STAFF
  WHERE YEARS = 10
    AND 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