Home » RDBMS Server » Server Administration » Delete Duplicate Rows
Delete Duplicate Rows [message #372481] Wed, 14 February 2001 22:07 Go to next message
Prashant patil
Messages: 6
Registered: October 2000
Junior Member
Is there any good method to delete duplicate rows from the table in single DELETE statement.
Re: Delete Duplicate Rows [message #372504 is a reply to message #372481] Fri, 16 February 2001 04:45 Go to previous messageGo to next message
Mahesh Satam
Messages: 2
Registered: February 2001
Junior Member
Hi Prashant,
Hope this will help you..!

Delete from my_table where rowid not in
(select max(rowid) from my_table
group by my_column_name )
/
Re: Delete Duplicate Rows [message #372505 is a reply to message #372481] Fri, 16 February 2001 04:47 Go to previous messageGo to next message
Mahesh Satam
Messages: 2
Registered: February 2001
Junior Member
Hi Prashant,
Hope this will help you..!

Delete from my_table where rowid not in
(select max(rowid) from my_table
group by my_column_name )
/
Re: Delete Duplicate Rows [message #374068 is a reply to message #372481] Wed, 23 May 2001 14:04 Go to previous message
Raj
Messages: 411
Registered: November 1998
Senior Member
What is the role played by "max" before rowid. If I remove max and run the q it does't work. please explain.

thanks
raj
Previous Topic: retrieve the image
Next Topic: count function
Goto Forum:
  


Current Time: Mon Dec 23 12:58:34 CST 2024