7.6.1 Specification format for WHERE clauses
The WHERE clause specifies search conditions.
- Organization of this subsection
(1) Specification format
WHERE-clause ::= WHERE search-condition
(2) Explanation of specification format
- search-condition:
-
For details about search conditions, see 7.18 Search conditions.
(3) Example
The following example illustrates the WHERE clause.
- Example
-
From the sales history table (SALESLIST), this example retrieves the customer ID (USERID), product code (PUR-CODE), and date of purchase (PUR-DATE) for customers who purchased product code P002 on or after September 6, 2011.
SELECT "USERID","PUR-CODE","PUR-DATE" FROM "SALESLIST" WHERE "PUR-DATE">=DATE'2011-09-06' AND "PUR-CODE"='P002'
The underlined portion indicates the WHERE clause.