Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Finding rows with column1+column2 values are unique
qazmlp1209_at_rediffmail.com wrote in news:1169013118.142066.56500@
11g2000cwr.googlegroups.com:
> How do we find out the number of rows in a Table where the combination
> of two (non-key)column values are unique?
>
select col1, col2, count(*)
from mytable
group by col1, col2
having count(*) = 1
Received on Thu Jan 18 2007 - 20:59:23 CST