Difference between revisions 469062840 and 478083442 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 should be used to limit the number of rows affected by a SQL DML statement or returned by a query. ==Overview== (contracted; show full)The following [[Delete (SQL)|<code>DELETE</code> statement]] removes only those rows from table ''mytable'' where the column ''mycol'' is either NULL or has a value that is equal to 100. <source lang="sql"> DELETE FROM mytable WHERE mycol IS NULL OR mycol = 100 </source> The proper syntax for writing [SQL Where clause<ref>{{citation web |url=http://www.sqlserver-training.com/sql-where-video-tutorial/- SQL Where clause]}}</ref> is <font color="#0000ff" size="4">SELECT <font color="#ff0000" size="2"><<column list>></font> FROM <font color="#ff0000" size="2">table</font> WHERE <font color="#ff0000" size="2">column </font><font color="#c0504d">operatorvalue</font></font> == Predicates == (contracted; show full){{DEFAULTSORT:Where (Sql)}} [[Category:SQL keywords]] [[cs:WHERE]] [[no:Where (SQL)]] [[ru:Where (SQL)]] [[sq:Where (SQL)]] [[uk:Where (SQL)]] 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=478083442.
![]() ![]() 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.
|