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

Why do we need view in sql?

991


What is a relationship and what are they?

1155


Explain the order of sql statement execution?

1049


explain access control lists. : Sql dba

1005


Is sql low level language?

1023


what are date and time data types in mysql? : Sql dba

977


How do you update a value in sql?

1047


What are transaction and its controls?

1044


How show all rows in sql?

1017


how do you login to mysql using unix shell? : Sql dba

1086


How do you use join?

947


What is the use of double ampersand (&&) in sql queries? Give an example

1143


What is difference between hql and native sql?

1178


What is a join query?

970


How to get list of all tables from a database?

1162