Try this SELECT COL_TO_CHECK, COUNT(COL_TO_CHECK) FROM TABLE_NAME GROUP BY COL_TO_CHECK HAVING COUNT(COL_TO_CHECK) > 1
delete from test a where rowid <> ( select max(rowid) from test b where a.sno = b.sno and a.sname = b.sname ) This querry will find duplicate rows and delete those. On Mon, Mar 29, 2010 at 11:55 AM, Niraj Parihar < [email protected]> wrote: > Can any body help me on a query where i have to find out the number of > duplicate records in a table independent of the columns defined in a table. > -- > Thanks and Regards, > Niraj Singh Parihar > > -- > You received this message because you are subscribed to the Google > Groups "Oracle PL/SQL" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/Oracle-PLSQL?hl=en > > To unsubscribe from this group, send email to oracle-plsql+ > unsubscribegooglegroups.com or reply to this email with the words "REMOVE > ME" as the subject. > -- Rajesh V.Dhumal -- You received this message because you are subscribed to the Google Groups "Oracle PL/SQL" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/Oracle-PLSQL?hl=en To unsubscribe from this group, send email to oracle-plsql+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.
