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 a db2 table?

0 Answers  


How do I import a csv file into db2?

0 Answers  


What are the functions in DB2?

3 Answers   Satyam,


what is commit & rollback? When and where is used while compiling a cobol-db2 program?

2 Answers  


What error I will get if my select query gives multiple row while executing a Cobol-DB2 program.How can I solve it without using a cursor.

4 Answers   Cap Gemini, Verizon,






What are foreign keys in db2?

0 Answers  


How to access db2 tables in mainframe?

0 Answers  


What are bind parameters in db2?

0 Answers  


What is role in db2?

0 Answers  


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

2 Answers   IBM,


Is db2 relational database?

0 Answers  


Is it possible to create an Instance in DB2 using DB2 Control Center ?

0 Answers   MCN Solutions,


Categories