We've expanded our news coverage and improved our search! Visit
oreilly.com for the latest or search for all things across O'Reilly!
Article:
 |
|
SQL Data Types
|
| Subject: |
|
Prove that the combination of two columns are unique |
| Date: |
|
2006-08-18 07:52:04 |
| From: |
|
PatTheDBA
|
Response to: Prove that the combination of two columns are unique
|
Try this:
select column1 || column2, count(1)
from some_table
group by column1 || column2
having count(1) > 1
This will return all rows that are not unique and the number of duplicates
|