skip to main content
SQL Statements and Extensions for the Salesforce Driver : Select : Select Clause : Where Clause
  
Where Clause
Purpose
The Where clause specifies the conditions that rows must meet to be retrieved.
Grammar
WHERE expr1rel_operatorexpr2
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
The following 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
See also
See Subqueries for complete information about subqueries.
See SQL Expressions for details about expressions.