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

How can you find out which query is taking lot of time to execute in cobol-db2 program ?

1 Answers   Danske,


What is the clustering index in the db2 database?

0 Answers  


What is a DB2 bind?

1 Answers   Logica CMG,


What does db2 blu stand for?

0 Answers  


Where would you find information about the type of database authority held by the user?

2 Answers  






What is reorg in DB2

3 Answers   Virtusa,


what is a corelated subquerry?

0 Answers   IBM,


How do you filter out the rows retrieved from a Db2 table ?

1 Answers  


how do you resolve -805?

3 Answers   HCL,


What is database reorganization?

0 Answers  


How to define the data items to receive the fetch items for the SQL?

2 Answers  


I need to view the number of tables existing under one particular Owner. Is it possible? If so, pl give the SQL query for this?

2 Answers  


Categories