Condition (SQL): Difference between revisions

Content deleted Content added
Examples: better 2nd example
m Replaced outdated html codes with wikicodes.
Line 1:
{{Refimprove|date=December 2009}}
 
A [[relational database management system]] uses [[SQL]] '''conditions''' or [[Expression (programming)|expressions]] in '''[[Where (SQL)|<tt>{{mono|WHERE</tt>}}]]''' clauses and in '''[[Having (SQL)|<tt>{{mono|HAVING</tt>}}]]''' clauses to '''<tt>{{mono|[[select (SQL)|SELECT]]</tt>}}''' subsets of data.
 
== Types of condition ==
Line 36:
 
==Examples==
To '''<tt>{{mono|SELECT</tt>}}''' one row of data from a table called ''tab'' with a primary key column (''pk'') set to 100 &mdash; use the condition ''pk = 100'':
<syntaxhighlight lang="sql">SELECT * FROM tab WHERE pk = 100</syntaxhighlight>