DB2 graphic  QMF Version 8

Selecting rows

There are times you will not want to view every row in a table. To select specific rows to view, use the WHERE keyword, followed by a condition. If you do not use the WHERE keyword, all the rows in the table are displayed.

For example, to select only the rows for employees who work in Department 20, type:

SELECT DEPT, NAME, JOB, COMM
  FROM Q.STAFF
  WHERE DEPT = 20

QMF displays this report when you run the query:

     DEPT  NAME       JOB        COMM
   ------  ---------  -----  ----------
       20  SANDERS    MGR           -
       20  PERNAL     SALES      612.45
       20  JAMES      CLERK      128.20
       20  SNEIDER    CLERK      126.50


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