Condition (SQL)

From Seo Wiki - Search Engine Optimization and Programming Languages
Jump to navigationJump to search

A relational database management system uses SQL conditions or Expression (programming) in WHERE clauses and in HAVING clauses to SELECT subsets of data.

Examples

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

If you like SEOmastering Site, you can support it by - BTC: bc1qppjcl3c2cyjazy6lepmrv3fh6ke9mxs7zpfky0 , TRC20 and more...