Where clause
- Last Updated: October 27, 2017
- 1 minute read
- DataDirect Connectors
- JDBC
- Oracle Eloqua 6.0
- Documentation
Purpose
Specifies the conditions that rows must meet to be retrieved.
Syntax
WHERE expr1 rel_operator expr2
where:
- expr1
- is either a column name, literal, or expression.
- expr2
- is either a column name, literal, expression, or subquery. Subqueries must be enclosed in parentheses.
- rel_operator
- is the relational operator that links the two expressions.
Example
This Select statement retrieves the first and last names of employees that make at least $20,000.
SELECT last_name, first_name FROM emp WHERE salary >= 20000