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

What sql database should I use?

1072


Can a procedure in a package be overloaded?

982


Can we use two order by clause in query?

918


What is full join?

896


How many types of tables are there?

900


What are the various levels of constraints?

1059


Which is better cte or subquery?

970


What is sqlerrd?

921


Can I learn sql in a week?

1004


What is sql select statement?

969


What is a primary key called that is made up of more than one field?

1283


What are the different types of triggers?

1052


How long will it take to learn pl sql?

889


Explain select statements in sql?

999


How do you identify a primary key?

1010