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...

i have a table like this :
Name ADDRESS
Toto 123 ...
Toto 456
ToTo 678

I would like to delete 2 last row...please tell me how to
delete its

Answer Posted / vaneesh khurana

I think better to perform this in following 2 queries

1. Select count(WS-COUNT) from TABLE;

2. DELETE FROM TABLE WHERE ROWCOUNT(*) IS WS-COUNT OR
(WS-COUNT-1);

Basically here the first row will give you the record count
and 2nd will delete the last and the 2nd last row.

Is This Answer Correct ?    0 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to test SQL -911 error while developing COB-DB2 program

7445


What is collection in db2 bind?

964


What is the advantage in De-normalizing tables in DB2?

1117


What is meant by dclgen?

1061


List out the data types available.

1084


What is dclgen in db2?

1084


What is universal database?

1029


How to check last update on table in db2?

1004


What is db2 instance?

1018


How can you validate Sql errors during cursor operation in db2 pgms and where do you code?

2170


How would you find out the total number of rows in a db2 table?

990


What are foreign keys in db2?

1037


What does a deadlock mean in DB2?

1099


What is the role of data manager in the db2 database?

1053


What is dbrm library?

1003