Re: Looking For Query

Re: Looking For Query

 

  

To delete duplicate rows:

DELETE FROM XYZ WHERE rowid NOT IN (SELECT MAX(ROW_ID) FROM XYZ GROUP BY
contract_no);





Ruel Rodriguez
OCP-Internet Application Developer
OCA-Oracle DBA
Global Computer Associates
Richmond, Virginia

----- Original Message -----
From: "Peace On Earth" <[Email Address Removed] "LazyDBA.com Discussion" <[Email Address Removed] Friday, January 31, 2003 3:48 PM
Subject: Looking For Query


> I have a table
>
> XYZ
>
> with structure
>
> contract_no
> credit_line
> salary
> ...
>
>
> how can I in one query remove duplicate values of
> contract_no. I am able to do this with multiple
> queries but can this be done with a single query
>
> Rizwan
>
> __________________________________________________
> Do you Yahoo!?
> Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
> http://mailplus.yahoo.com
>
> --------
> Oracle documentation is here:
http://tahiti.oracle.com/pls/tahiti/tahiti.homepage
> To unsubscribe: send a blank email to oracledba-[Email Address Removed] To subscribe: send a blank email to oracledba-[Email Address Removed] Visit the list archive: http://www.LAZYDBA.com/odbareadmail.pl
> Tell yer mates about http://www.farAwayJobs.com
> By using this list you agree to these
terms:http://www.lazydba.com/legal.html
>
>


Oracle LazyDBA home page