Content deleted Content added
m WP:CHECKWIKI error fixes using AWB (9075) |
→Examples: syntax highlight |
||
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 — use the condition ''pk = 100'':
▲ SELECT * FROM tab WHERE ''pk = 100''
To identify whether a table ''tab'' has rows of data with a duplicated key column ''dk'' set to 100 — use the condition ''dk = 100'' and the condition ''having count(*) > 1'':
▲ SELECT * FROM tab WHERE ''dk = 100'' having count(*) > 1
{{SQL}}
|