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
DB2 can implement a join in three ways using a merge join, a nested join or a hybrid join. Explain the differences?
What is the maximum length of sqlca?
How is the value function used?
Is schema the same as database?
Which command is used to connect to a database in DB2 ? Give the Syntax.
List out the three types of page locks that can be held.
When reorg is used?
Define db2.
What is ibm db2 client?
What do you mean by storage group (stogroup)?
How do you select a row using indexes in db2?
How to find the maximum value in a column in the db2 database?
Define check constraint.
How is deadlock resolved?
What are the various isolation levels possible?