Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

how will you find out the last three records in a table
with n no of records and delete them

Answer Posted / ajit

delete from emp
where empno in
(select empno
from emp
minus
select empno
from emp
where rownum <= ( select count(*) - 3
from emp
))

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to move files from one directory to another in pl sql?

1196


What is the purpose of the primary key?

1064


Which function is used to return remainder in a division operator in sql?

1142


What is schema in sql?

950


Do ddl statements need commit?

973


What is a null value?

1145


What's the procedure?

930


How do I find duplicates in sql?

930


What is auto increment in sql?

1122


What is the process of debugging?

1071


what are the features and advantages of object-oriented programming? : Sql dba

1011


Why do you partition data?

1022


How do I restart sql?

976


What packages are available to pl/sql developers?

1059


How to avoid using cursors? What to use instead of cursor and in what cases to do so?

1193