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
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 |
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 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 |
What is db2 and what is the use of db2 optimizer?
How does coalesce work?
Define db2.
How to resolve -504 sql code in DB2?
What is ibm db2 connect?
What is the purpose of the WHENEVER statement?
Plan has the optimized access path in it. But is that optimized access path is attained or known
What is pagespace?
Can we use select query in a loop to fetch multiple rows in a COBOL PROGRAM? If so, what is the advantage of cursor?
can you use symbolic parameters in JOB?
What does db2 stand for?
How to create backup table in db2?