Home » SQL & PL/SQL » SQL & PL/SQL » URGENT!! How do i remove duplicate value from a table
URGENT!! How do i remove duplicate value from a table [message #3935] Mon, 28 October 2002 00:17 Go to next message
venkatesh
Messages: 72
Registered: August 2000
Member
hi there,

plz help me in this. How do i remove duplicate value from a table using SQL query.

thanx in advance.
Re: URGENT!! How do i remove duplicate value from a table [message #3937 is a reply to message #3935] Mon, 28 October 2002 01:04 Go to previous message
Deepa
Messages: 269
Registered: November 2000
Senior Member
this query will delete the duplicate rows

DELETE FROM table_name
WHERE ROWID IN (SELECT MIN (ROWID)
FROM table_name
GROUP BY column_list
HAVING COUNT (*) > 1);

to avoid selecting duplicate rows from the table use distinct in the query
Previous Topic: What is a table Partioning
Next Topic: LONG datatype error on insert
Goto Forum:
  


Current Time: Sun May 05 08:51:29 CDT 2024