In my table having 3000 Records. How can I delete the 500th
row? (we don't know what is data inside the table)

Answers were Sorted based on User's Feedback



In my table having 3000 Records. How can I delete the 500th row? (we don't know what is data ..

Answer / pratap

delete from table where ROWNUM = 500;
As per IBM notes ROWNUM is support feature in DB2.

Is This Answer Correct ?    0 Yes 0 No

In my table having 3000 Records. How can I delete the 500th row? (we don't know what is data ..

Answer / suraj kumar pathak

SELECT * FROM (SELECT col1,col2,col3, rownumber() over() AS rn FROM tab1) as tr WHERE rn = 500;

Is This Answer Correct ?    4 Yes 5 No

In my table having 3000 Records. How can I delete the 500th row? (we don't know what is data ..

Answer / venkata subbaiah

Delete from table where rowid=500;

Is This Answer Correct ?    1 Yes 6 No

Post New Answer

More COBOL Interview Questions

have in 100 records in a file i want to move only matched records to one output_file1 and nonmathed records are moved to another output_file2 ... any one can provide logic code

3 Answers  


What is file status 39 ?

10 Answers   JPMorgan Chase,


How to delete a front spaces in a data-name/variable in cobol Example:- 01 data-name-1 PIC x(20) value " cobol language". 01 data-name-2 PIC x(20). MOVE data-name-1 to data-name-2. would like the value of data-name-2 is "cobol language".

3 Answers  


RENAME clause takes new SPACE in memory.TRUE or FALSE? a)TRUE 2)FALSE

12 Answers   TCS,


how we sort two input files based on a common column and giving one o/p file please send me the coding logic?

0 Answers   Valtech,






what is amode(24), amode(31), rmode(24) and rmode(any)?

0 Answers  


Which of the following EDITind and PICTURE symbols is to be used if a minus(-) is to appear before the value if the value is -ve and a plus(+) is to appear before the value if the value is +ve? (a) + (b) - (c) + OR (d) It is not possible

7 Answers   TCS,


What will happen if a variable is declared as below.. Explain with an example? Working storage section:- 01 WS-VARX PIC X(10) VALUE 'ABCDEFGHIJ'. 01 WS-VARN REDEFINES WS-VARX PIC 9(5) VALUE '12345'. What will happen I want Display WS-VARX and WS-VARN?

3 Answers   Xansa,


what are the utilities for load and unload the DB2 tables

1 Answers   L&T,


What are options have been removed in COBOL 11?

1 Answers  


We are using the searching a table which is indexed, once the key is found, how can we get the occurance at which the key was found.

1 Answers  


77 I pic 99 value 5 Perorm para-A I times. Para -A. move 10 to I. How many times the para-A will be executed.?

9 Answers   TCS,


Categories