(Contents)(Previous)(Next)

Example of a SELECT Statement

For clarity reasons, UPPER case characters are used in the following for ADABAS statements, lower case characters for table and column names.

SELECT title, name, city, state, zip

FROM customer

WHERE state = 'CA'

ORDER BY name

This means:

* Find (SELECT)

* the columns title, name, city, state, zip

* in the table 'customer' (FROM)

* for the rows with the value 'CA' in the column 'state' (WHERE)

* and order the result rows alphabetically according to name (ORDER BY)

The general form of a SELECT statement looks like this:

SELECT..... which columns

FROM....... which table

WHERE...... the condition is

ORDER BY... in the following way

The result of the SELECT statement is the following table:


(Contents)(Previous)(Next)