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 |
How can we retrieve the total number of records in RPG & CLLE?
i want to know how the commit option works,how it save the changes? it will update the database or what ? where we can see these saved changes?
How many databases can be created inside an instance in db2 ?
What statistic will tell the DBA how must space can be reclaimed from dropped table spaces on the next reorg run?
What's the maximum number of characters that a tablename can have?
What is plan in cobol db2?
Can any one tell me about Restart logic in DB2.
Name some fields from SQLCA
What does DSNDB07 database do?
what is difference between Plan and Package
What is the database descriptor?
Is db2 free?