Condition (SQL): Difference between revisions

Content deleted Content added
Bluelinking 2 books for verifiability.) #IABot (v2.1alpha3
m Task 70: Update syntaxhighlight tags - remove use of deprecated <source> tags
Line 37:
==Examples==
To '''<tt>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'':
<sourcesyntaxhighlight lang="sql">SELECT * FROM tab WHERE pk = 100</sourcesyntaxhighlight>
 
To identify whether a table ''tab'' has rows of data with a duplicated key column ''dk'' set to 100 &mdash; use the condition ''dk = 100'' and the condition ''having count(*) > 1'':
<sourcesyntaxhighlight lang="sql">SELECT * FROM tab WHERE dk = 100 HAVING count(*) > 1</sourcesyntaxhighlight>
 
{{SQL}}