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()
DELETE FROM RR
|Is This Answer Correct ?||2 Yes||0 No|
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.
delete from (
select row_number() over() as row_num from
where TEST is my schema name and
TABLE_TEST is my test table.
|Is This Answer Correct ?||0 Yes||0 No|
Answer / magesh
delete from (select row_number() over() as COLUMN1 from
|Is This Answer Correct ?||0 Yes||1 No|
how to check the table is empty or not?
What are the disadvantages of PAGE level lock?
What will happen, while trying to close the closed cursor.
List down the data types in the db2 database.
I have 3 cursors declared. Cursor1 retieves some data. Based on this curso2 will also fetches some data. In cursor3 (using for some updation) I'm using the data retrieved by the above 2 cursor. My question is, while working with cursor3, periodically if I give commit, will all the three crsors will be closed or only cursor3 will be closed?
How would the varchar column remarks defined?
How to design maps
What is the meaning concurrency in the db2 database?
What is catalog database in db2?
How would you find out the total number of rows in a db2 table?
What is declare cursor?
Can DASD types assigned to storage groups be intermixed (i.e., 3350s and 3380s)?