i want to delete 20th million record how ?

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


Please Help Members By Posting Answers For Below Questions

Define db2 and its databases?

612


How to access db2 tables in mainframe?

607


What is view db2?

614


Can we delete records from view?

551


What is dbrm? What it contains?

668






What is temporal table in db2?

595


How do I connect my db2 database to ibm?

596


What are the prerogatives?

609


How does db2 sample database connect?

561


Define check constraint.

633


What is a db2 collection?

596


Hi Everyone... Under the Logical files, when am working on multiple rec format logical file, I have joined two pf's using the multiple record format logical file concept, but when i run queried the LF only the first mentioned pf records are reflecting and I am not able to see any of the field records specified under the second pf. Kindly let me know whats the reason behind this. Below is the str of LF., R rec PFILE(LOGICAA) CUSTNO CUSTNAME BILL K CUSTNO R rec1 PFILE(LOGICAA1) CUSTNO ADD K CUSTNO .....

1881


Explain correlated sub-queries.

581


Can we insert update delete in view?

567


What is a trigger in the db2 database?

586