Difference between revisions 493513718 and 514271768 on enwiki

{{Unreferenced|date=April 2007}}
A <code>WHERE</code> clause in [[SQL]] specifies that a SQL [[Data Manipulation Language|Data Manipulation Language (DML)]] statement should only affect 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.

==Overview==
(contracted; show full)FROM   mytable
WHERE  mycol > 100 AND item = 'Hammer'
</source>

=== IN ===
<code>IN</code> will find any values existing in a set of candidates.
<source lang="sql">
SELECT ename WHERE ename IN ('value1', 'value2', 
...dipak kumar nimawat)
</source>
All rows match the predicate if their value is one of the candidate set of values. This is the same behavior as
<source lang="sql">
SELECT ename WHERE ename='value1' OR ename='value2'
</source>
except that the latter could allow comparison of several columns, which each <code>IN</code> clause does not. For a larger number of candidates, <code>IN</code> is less verbose.

(contracted; show full){{DEFAULTSORT:Where (Sql)}}
[[Category:SQL keywords]]

[[cs:WHERE]]
[[no:Where (SQL)]]
[[ru:Where (SQL)]]
[[sq:Where (SQL)]]
[[uk:Where (SQL)]]