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 a db2 collection?
could you give me an example how, where i code CHECKPOINT and restart...I need and example....thanks..
Explain in detail about buffer manager and its functionalities?
What is an alias and how does it differ from a synonym?
How do I create a table MANAGER (EMP-NO, MANAGER) where MANAGER is a foreign key which references to EMP-NO in the same table? Give the exact DDL.
What is declare cursor?
What is ibm db2 used for?
In SPUFI suppose you want to select maximum of 1000 rows, but the select returns only 200 rows. What are the 2 SQLCODEs that are returned?
How can we retrieve the total number of records in RPG & CLLE?
What is the use of predicate?
What is innodb buffer pool?
1. what if null values retrived from database and no null indicator mentioned in query. What is sql code.