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 |
What is a DB2 bind?
how can you save the query in QMF?IS IT POSSIBLE OR NOT.IF POSSIBLW HOW?
Write a query to retrive partial string.
How would you print the output of an SQL statement from SPUFI?
What is phantom read in db2?
what are the frequent DB2 abends did you encounter in your programs ?? What are different SQL abends ??
What are some characteristics of columns that benefit from indexes?
db2 query I have one table with the following details. SNO SNAME DOJ ------ -------------------- ---------- 10 KRISH 2007-03-19 20 REDDY 2007-05-19 30 RRRRR 2007-05-19 40 BBBBB 2008-05-19 50 CCCCC 2009-05-19 60 JJJJJ 2009-05-19 70 JJJJJ 2004-05-19 i want the output in the following format:( no of students joined in each year(no nedd to consider about month and date) year count --------- ---------- 2004 1 2007 3 2008 1 2009 2
In cobol+DB2program if the code of cobol program has changed than i have to do precompilation once again?
Explain the function of data manager.
What is db2 stogroup?
Can All Users Have The Privilege To Use The SQL Statement Select (DML)?