version 11
predicate |
NOT search_condition |
(search_condition) |
search_condition OR search_condition |
search_condition AND search_condition |
Description
A search_condition specifies a condition to be applied to the data retrieved. A combination of search conditions using AND or OR keywords can also be applied. You can also precede a search_condition with the NOT keyword in order to retrieve data that does not meet the specified condition.
It is also possible to pass a predicate as a search_condition.
Example
Here is an example using a combination of search conditions in the WHERE clause:
SELECT supplier_id FROM suppliers WHERE (name = 'CANON') OR (name = 'Hewlett Packard' AND city = 'New York') OR (name = 'Firewall' AND status = 'Closed' AND city = 'Chicago');
See Also
DELETE, predicate, SELECT, UPDATE.