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

EXPLAIN has output with MATCHCOLS = 0. What does it mean?

2 Answers  


What is the difference between Primary key and unique index?

6 Answers  


what is db2 restart?

0 Answers  


what's the error code for Unique Index Violation?

2 Answers  


How do you declare a host variable (in COBOL) for an attribute named emp-name of type VARCHAR(25) ?

2 Answers   IBM, Tech Mahindra,


How to resolve -502 sql code in DB2?

2 Answers   Cap Gemini,


what is the differences between spufi and qmf and which is better?

4 Answers   Accenture, Cap Gemini,


Are views updateable?

0 Answers  


which is the most efficient tablespace?? a.simple tablespace. b.partitioned tablespace. c.segmented tablespace. d.none of the above. please post answer with the reason.?

3 Answers  


How are write I/Os from the buffer pool executed?

1 Answers  


How does coalesce work?

0 Answers  


How to create backup table in db2?

0 Answers  


Categories