Duplicated records in Oracle

mrong
mrong used Ask the Experts™
on
Greeting,

I need a sql stmt to get duplicated records in oracle. That is field1,field2 and fields are same in tbl1.

Thanks.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Most Valuable Expert 2012
Distinguished Expert 2018
Commented:
Try this:

select field1, field2, field3 from (
select field1, field2, field3 row_number() over(partition by  field1, field2, field3  order by  field1, field2, field3) myrownum
)
where myrownum>1;
Most Valuable Expert 2011
Top Expert 2012

Commented:
elect * from yourtable where field1=field2  or field1 is null and field2 is null

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial