Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

delete all but first n row

bishuJun 6 2013 — edited Jun 7 2013
how can i delete all the rows keeping only first n row.

ie if i have ant table test with one field

select * from test returns

ron
mickey
hanes
mighty
ripper
lobo
axe


i want to write a query which will keep first 3 record and delete rest from 'mighty' to 'axe'.
This post has been answered by jeneesh on Jun 7 2013
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 5 2013
Added on Jun 6 2013
7 comments
20,294 views