Answer Posted / ratheesh nellikkal
Hi All,
I don't think RR and ROWCOUNT works in DB2 for LUW.
So you could go for another option.
Row_number() Over() function you can use for this puspose.
Eg.
delete from (
select row_number() over() as row_num from
TEST.TABLE_TEST )
where row_num=20000000;
where TEST is my schema name and
TABLE_TEST is my test table.
Cheers Guys.
Ratheesh Nellikkal
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Define data page.
What is the purpose of using commit?
How do I delete a table in db2?
How to find primary key of a table in db2?
How do I import a csv file into db2?
What is the difference between "db2ilist" and "db2 get instance" commands in DB2 Database Server?
Why do we use cursor?
can all users have the privilage to use the sql statement select * (dml)?
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 collection in db2 bind?
What does sqlcabc has?
On which levels locks can be applied?
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?
How do I start db2 in windows?
What is the difference between db2 and oracle?