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


Please Help Members By Posting Answers For Below Questions

How to execute stored procedure in db2 command editor?

532


What are the bind parameters ibm db2?

624


Is ibm db2 free?

575


What does sqlcabc has?

633


What is the connection string to connect to the DB2 Database ?

614






How do you simulate the explain of an embedded sql statement in spufi/qmf?

634


What is the physical storage length of timestamp data type?

646


What is the role of schema in the db2 database?

653


What is multi row fetch in db2?

607


Are views updateable?

645


i want to maintain uniqueness on pdf without make lf??????????

1635


How can you count the number of rows from a table tab?

637


What is the difference between bind and rebind in db2?

854


What is bufferpool in db2?

580


What is the result of open cursor statement?

638