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 / sudipta santra

delete from
(select * from tab1
minus
select * from tab1 where rownum<n-2 order by rowid)

Is This Answer Correct ?    0 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is null operator in sql?

1010


How bulk collect improves performance?

984


What is the advantage of nosql?

1041


What is posting?

1023


What is an exception in pl/sql?

1052


How do you add a column to a table?

1036


what is the difference between mysql_fetch_array and mysql_fetch_object? : Sql dba

1041


Define tables and fields in a database

1109


How does rowid help in running a query faster?

1401


What are database links used for?

1028


How do I create a sql database?

978


What do you mean by dbms? What are its different types?

1000


What are the different tcl commands in sql?

1151


What are the ways on commenting in a pl/sql code?

1111


hi,i plan to put experience on PLSQL ,can anyone suggest me for any institutes in bangalore or how to prepare for interviews

2006