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 are character functions?

1094


What is a primary key sql?

1049


What is data type in database?

1003


What is sql used for?

1129


How do I sort a table in sql?

1053


What does count (*) do in sql?

1020


what is normalization? : Sql dba

1091


Which is better join or inner query?

1065


What is an inconsistent dependency?

1051


Can unique keys be null?

918


What is trigger in sql? Explain

1000


what are the nonstandard string types? : Sql dba

1149


what are the differences between char and varchar? : Sql dba

1082


What is the least restrictive isolation level? : Transact sql

1079


Why is nosql good?

1037