IBM Books

SQL Getting Started


Order of Operations

It is important to take into accout the order of operations. Output of one clause is the input to the next one as stated in the list below. An example where order of operations is a consideration is presented in Naming Expressions.

Also, note that this explanation allows for a more intuitive way of thinking about queries. It is not necessarily the way the operations are performed internally. The sequence of operations is as follows:

  1. FROM clause

  2. WHERE clause

  3. GROUP BY clause

  4. HAVING clause

  5. SELECT clause


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]

[ DB2 List of Books | Search the DB2 Books ]