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

DB2 can implement a join in three ways using a merge join, a nested join or a hybrid join. Explain the differences?

2911


What is the maximum length of sqlca?

1613


How is the value function used?

1210


Is schema the same as database?

1107


Which command is used to connect to a database in DB2 ? Give the Syntax.

1150


List out the three types of page locks that can be held.

1193


When reorg is used?

1182


Define db2.

1172


What is ibm db2 client?

1006


What do you mean by storage group (stogroup)?

1083


How do you select a row using indexes in db2?

1178


How to find the maximum value in a column in the db2 database?

1129


Define check constraint.

1129


How is deadlock resolved?

1204


What are the various isolation levels possible?

1181