SQL Language (MOSC)

MOSC Banner

duplicate rows

edited May 10, 2012 9:34PM in SQL Language (MOSC) 28 comments
Hi ,

I have to delete the duplicate rows by checking the created date .  Means if there are two rows for particular key_id , I have to remove the older record by checking the created date .The latest record data  I have to keep in table . Here the key_id and created is the composite primary key.

Here IS MY TABLE DESCRIPTION

SQL> desc prod.f0784
 Name                                      Null?    Type
 ----------------------------------------- -------- ----------------------------
 key_id                               NOT NULL NUMBER(20)
 rate                                 NOT NULL NUMBER(38)
 location                                      NUMBER(6)
 member                                        NUMBER(6)
 created_date                         NOT NULL DATE

Please help  help for sql query

Thanks!
 

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center