by using cursors , we can access particular records from
the table based on some condition, i want to delete those
selected records, how can we write a query for this in the
program?

Answers were Sorted based on User's Feedback



by using cursors , we can access particular records from the table based on some condition, i want..

Answer / satty

first declare cursor and select the records you wanted and
then use delete statement with where current of your cursor.
becoz it will help you to delete that particular record
which has been choosed.

if any thing wrong plz intimate

Is This Answer Correct ?    8 Yes 0 No

by using cursors , we can access particular records from the table based on some condition, i want..

Answer / vaneesh khurana

Hi Satty
Can you please let us know what command you will use for
delete.
Vaneesh

Is This Answer Correct ?    0 Yes 0 No

by using cursors , we can access particular records from the table based on some condition, i want..

Answer / vaneesh khurana

By the way, why to select a signle row using cursor then
delete, if you want to delete all the row mentioned in the
cursor search creteria, simply write a SQL query mentioning
delete where (matching search condition).

Is This Answer Correct ?    0 Yes 2 No

by using cursors , we can access particular records from the table based on some condition, i want..

Answer / narayana reddy

delete current(cursor) from table

Is This Answer Correct ?    0 Yes 3 No

Post New Answer

More DB2 Interview Questions

What is db2 plan table?

0 Answers  


Can we delete records from view?

0 Answers  


How do I add a column to a table in db2?

0 Answers  


What is filter factor?

2 Answers  


Do we have any optinon to search part of integer in DB2 as we have for character Like,SUBSTR optins?

1 Answers  






What are union and union all?

0 Answers  


A Table feild is declared as Decimal(7,2). I want to insert the decimal in to this column thru cobol-db2 program. How should I declare my local input file variable or any suggestion?

7 Answers   IBM,


How do you eliminate duplicate values in db2?

0 Answers  


Where can you declare a cursor in a cobol-db2 program?

0 Answers  


What is the role of schema in the db2 database?

0 Answers  


What is the difference between oracle and db2?

0 Answers  


how do you resolve -818 error in db2. where we have to see time stamp token. i said by seeing in load module and plan .is it correct or not. give clear explination for how to see time stamp token

2 Answers   IBM, TRD,


Categories