Previous Topic: ProcessingNext Topic: Example


Examples

In this example, the ORDER BY clause is used to order the results of the SELECT. The SELECT retrieves the number and name of all employees hired before 1980 in order of seniority. HIREDATE is in the form yymmdd.

      SELECT EMPNO, LASTNAME, FIRSTNME, HIREDATE
      FROM EMP
      WHERE HIREDATE < 800000
      ORDER BY HIREDATE