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 if we try to insert the base table through updatable view , but failed to give a column value which is defined as NOT NULL.

1 Answers   Cap Gemini,


what are the copybook changes generally we done?can anyone tell me......... Thanks in advance........

1 Answers  


What are the various locks available?

5 Answers   CTS,


what is the syntax for FOR UPDATE CLAUSE in cursor declaration and how can u update using cursor? is it possible to update multiple rows at a time.

2 Answers   Syntel,


What is the difference between base table and view?

7 Answers  


what is db2 restart?

0 Answers  


What is normalization and what are the five normal forms?

1 Answers  


What does db2 stand for?

0 Answers  


What do you mean by NOT NULL WITH DEFAULT? When will you use it?

3 Answers  


What is dynamic SQL?

1 Answers   ADP,


what is + sign and -ve sign for sql code ?

1 Answers   TCS,


DB2: A calls B once sucessfull and second time when it calls says curson is open why is it so?

1 Answers   IBM,


Categories