From Seo Wiki - Search Engine Optimization and Programming Languages
| This article does not cite any references or sources.
Please help improve this article by adding citations to reliable sources. Unsourced material may be challenged and removed. (December 2009)
|This article is an orphan, as few or no other articles link to it. Please introduce links to this page from related articles; suggestions are available. (December 2009)|
To SELECT one row of data from a table tab with primary key column pk set to 100 — use the condition pk = 100:
SELECT * FROM tab WHERE pk = 100
To SELECT the duplicate rows of data from a table tab with duplicate 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