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 / prashant shettar
delete from (select rownumber() over() as rowid from tab1 )
where rowid = ( (select count(*) from tab1) - 1)
| Is This Answer Correct ? | 2 Yes | 1 No |
Post New Answer View All Answers
How do we specify index to include or not during bind process.
What's The Percentage Free Space ?
what is a corelated subquerry?
what is the role of the cursor in db2?
What is cobol db2?
What os does db2 run on?
What is image copy in db2?
What is the latest version of ibm db2?
How do I delete a table in db2?
Mention the various locks that are available in db2.
How to test SQL -911 error while developing COB-DB2 program
How do I delete a table in database?
have 3 tables table1, table2 and table3 which contains employee information. table1 is master table, table2 contains emp details like emp no and so on, table 3 contains emp salary. so if any emp leave company between 25th - 30th of every month it has to get updated in tables. but it is not getting updated. What is the reason.
What is db2 bind process?
How do I add a column in db2?