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

how can we transpose a table using sql (changing rows to column or vice-versa) ? : Sql dba

896


Is time a data type in sql?

851


What is multiple partition?

919


What are the properties of a transaction?

1072


explain primary keys and auto increment fields in mysql : sql dba

899


How do I save a sql query?

961


What is the most restrictive isolation level? : Transact sql

1022


What is acid property in a database?

973


Explain the types of joins in sql?

959


how to fetch common records from two tables? : Sql dba

1105


How can you save or place your msg in a table?

952


how to analyze tables with 'mysqlcheck'? : Sql dba

957


What operating systems are supported by oracle sql developer?

902


What is #table in sql?

994


what is an alias command? : Sql dba

1006