Difference between revisions 553077062 and 555492110 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)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. === BETWEEN === <code>BETWEEN</code> will find any values within a range. <source lang="sql"> SELECT ename WHERE ename BETWEEN 'value1' AND 'value2' </source> <source lang="sql"> SELECT salary from emp WHERE salary BETWEEN 5000 AND 10000 </source>⏎ ⏎ All rows match the predicate if their value is between 'value1' and 'value2', inclusive. === LIKE === <code>LIKE</code> will find a string fitting a certain description. *Ending Wildcard **Find any string that begins with the letter 'S' <source lang="sql"> (contracted; show full) == References == <references /> {{SQL}} {{DEFAULTSORT:Where (Sql)}} [[Category:SQL keywords]] All content in the above text box is licensed under the Creative Commons Attribution-ShareAlike license Version 4 and was originally sourced from https://en.wikipedia.org/w/index.php?diff=prev&oldid=555492110.
![]() ![]() This site is not affiliated with or endorsed in any way by the Wikimedia Foundation or any of its affiliates. In fact, we fucking despise them.
|