Difference between revisions 1018320903 and 1018320966 on enwiki

{{Refimprove|date=September 2014}}
A <code>WHERE</code> clause in [[SQL]] specifies that a SQL [[Data manipulation language|Data Manipulation Language (DML)]] statement should only affect [[Row (database)|rows]] that meet specified criteria. The criteria are expressed in the form of predicates. <code>WHERE</code> clauses are not mandatory clauses of SQL DML statements, but can be used to limit the number of rows affected by a SQL DML statement or returned by a query. In brief SQL WHE(contracted; show full)
** Find any string that starts with a letter or number or the symbol '_'<syntaxhighlight lang="sql">
SELECT ename FROM emp WHERE ename LIKE '[a-zA-Z0-9_]%';</syntaxhighlight>
The LIKE predicate typically performs a search without the normal performance benefit of indexes. Using '=', '<>', etc.. instead will increase performance. 
 Users of the LIKE predicate should be aware that cCase sensitivity (e.g., 'S' versus 's') may be different based upon database product or configuration.

== References ==
<references />

== External links ==
* [http://www.psoug.org/reference/conditions.html PSOUG Home Puget Sound Oracle Users Group] gives several examples of SELECT statements with WHERE clauses.

{{SQL}}

[[Category:SQL keywords]]