Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: SQL Puzzle ...
K. Raghuraman wrote:
>
> Hi,
>
> I have a table with three columns and no keys defined. I want to
> eliminate only the duplicate records from the table in a single SQL
> delete statement. How do I construct my SQL statement ?
>
> Thanks and Regards,
>
> Raghu
Hi
placehoder key for better reading my example :
key := col1 ||col2||col3 ;
the delete-statement is as follows :
DELETE FROM TABLE T where T.ROWID > (SELECT MIN(T.ROWID) FROM TABLE X
WHERE X.KEY = L.KEY );
Thats it
Steffen Received on Mon Nov 16 1998 - 04:17:17 CST