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 / aswin

This query cost the performance :
delete from emp where empno in (select empno from (select
empno from emp order by rowid desc) where rownum <= 3)

Is This Answer Correct ?    9 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

describe transaction-safe table types in mysql : sql dba

965


How many aggregate functions are available there in sql?

950


How can get second highest salary in sql?

929


What is optimistic concurrency control? : Transact sql

958


What are the advantages of pl sql over sql?

977


Why do we go for stored procedures?

1008


Is left join and outer join same?

1022


Mention what pl/sql package consists of?

953


what is the command used to fetch first 5 characters of the string? : Sql dba

1604


what are rollup and cube in t-sql? : Transact sql

1061


Is big data nosql?

896


What is multiple columns?

1023


What is the difference between having clause and where clause?

1027


What are % type and % rowtype?

994


What is primary key sql?

970