i want to delete 20th million record how ?
Answers were Sorted based on User's Feedback
Answer / rajesh
Hope this will do.
delete from tbname where rowcount(*) = 200000 ;
Is This Answer Correct ? | 8 Yes | 2 No |
Answer / sxion045
CREATE VIEW RR(A,B,X) AS
SELECT R.*, ROW_NUMBER()
FROM R;
DELETE FROM RR
WHERE X=20000000;
Is This Answer Correct ? | 2 Yes | 0 No |
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 |
Answer / magesh
delete from (select row_number() over() as COLUMN1 from
TABLE_OWNER.TABLE_NAME )
where COLUMN1=20000000;
Is This Answer Correct ? | 0 Yes | 1 No |
Can a primary key have null values? If we try to insert a null value in a primary key column, will it work or give an error code?
Assuming that a site's standard is that pgm name = plan name, what is the easiest way to find out which Will precompile of an DB2-COBOL program bomb, if DB2 is down?
what are the copybook changes generally we done?can anyone tell me......... Thanks in advance........
When a COBOL-DB2 program in PRODUCTION is updating main tables and gone for long run, what have to do?
Which component is responsible for db2 startup and shutdown?
what is consistency token
what is difference between Static call and Dynamic call? How does it function?
DB2 can implement a join in three ways using a merge join, a nested join or a hybrid join. Explain the differences?
What is the difference between db2 and oracle?
What is database reorganization?
Is it possible to create an Instance in DB2 using DB2 Control Center ?
What is ALTER ?