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
what is db2 restart?
How to execute stored procedure in db2 command editor?
What is phantom read in db2?
Which command is used to connect to a database in DB2 ? Give the Syntax.
What is the meaning concurrency in the db2 database?
What is the purpose of using commit?
by using cursors , we can access particular records from the table based on some condition, i want to delete those selected records, how can we write a query for this in the program?
ther r 2 tables OTTABLE & SALTABLE, add the otamt from OTTABLE to empsal of SALTABLE if eid is matched else add the unmatched from OTTABLE to SALTABLE
List down the types of triggers in the db2 database?
Differentiate between cs and rr isolation levels? Where do you specify them?
What is the physical storage length of date data type?
How do I delete a table in db2?
Following a db2 update statement, what is the quickest way to compute the total number of updated rows?
SQLCODE = -199, ERROR: ILLEGAL USE OF KEYWORD CHAR, TOKEN KEY was expected
Is ibm db2 open source?