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 the syntax for seeing the columns and data types of a table in the db2 database?
what is the steps followed in EXPLAIN Process or EXPLAIN command. (Explain is for identifying the optimized access path but how or what is the steps for doing the EXPLAIN)
Hi this is sures. i need to practice the ibm mainframes.could u telme how can i get userid from IBM.how much cost they will collect for one user id.can send me the details please.thanq
Explain the use of the WHERE clause?
Is db2 relational database?
how to fetch first 100 rows in db2
How to resolve -818 sql code in DB2?
What is the error code -803 ?
On which levels locks can be applied?
How is a typical db2 batch pgm executed?
What is a collection?
What does db2 plan contain?