Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


i want to delete 20th million record how ?

Answers were Sorted based on User's Feedback



i want to delete 20th million record how ?..

Answer / rajesh

Hope this will do.

delete from tbname where rowcount(*) = 200000 ;

Is This Answer Correct ?    8 Yes 2 No

i want to delete 20th million record how ?..

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

i want to delete 20th million record how ?..

Answer / 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

i want to delete 20th million record how ?..

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

Post New Answer

More DB2 Interview Questions

What is image copy?

1 Answers   Virtusa,


How to resolve the -305 error code in DB2? And also please let me know, how to resolve the db2 error codes.

7 Answers   TCS,


Which isolation level provides highest data integrity?

0 Answers  


What are the isolation levels possible ?

3 Answers  


What is the syntax of SELECT statement when embedded in a COBOL program?

2 Answers  


what is diffrence b/w file-aid tool and file-aid utility???

1 Answers  


can I alter a table (e.g. adding a column) when other user is selecting some columns or updating some columns from the same table?

1 Answers  


What do the initials DDL and DML stand for and what is their meaning?

2 Answers  


What is reorg and runstats in db2?

0 Answers  


How to restart a DB2 program?

0 Answers   Cognizant,


How can we define a table? How can we apply SEARCH ALL on it ?

1 Answers  


How do u achieve record level locking in DB2 versions when record level locking is not allowed?

2 Answers   IBM,


Categories