Home » SQL & PL/SQL » SQL & PL/SQL » Checking duplicate ROWS
Checking duplicate ROWS [message #249392] Wed, 04 July 2007 04:33 Go to next message
fastfreeeasy
Messages: 25
Registered: June 2007
Junior Member
Finding duplicate (all column values are same) rows in a table.
I tried lot of times to solve this problem but did not get any solution. Need a generic SQL or PL/SQL. Assumption, number of columns is N.
Re: Checking duplicate ROWS [message #249409 is a reply to message #249392] Wed, 04 July 2007 06:28 Go to previous messageGo to next message
Michel Cadot
Messages: 64151
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
select col1, col2, ...
from mytable
group by col1, col2, ...
having count(*) > 1
/

Regards
Michel
Re: Checking duplicate ROWS [message #249423 is a reply to message #249409] Wed, 04 July 2007 07:38 Go to previous message
ab_trivedi
Messages: 460
Registered: August 2006
Location: Pune, India
Senior Member
thanks michel its working
Previous Topic: Executing Default Parameter in Procedure
Next Topic: transpose
Goto Forum:
  


Current Time: Fri Dec 09 14:01:56 CST 2016

Total time taken to generate the page: 0.14302 seconds