Suppose if I need to update a column, how you do that using
cursor?

Answer Posted / sandy

EXEC SQL DECLARE X CURSOR FOR
SELECT * FROM ABC
FOR UPDATE OF <COLUMN> ==>If we know the column we would
like to update.

Is This Answer Correct ?    4 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

I HAVE 500 ROW TO UPDATE I WOULD LIKE TO USE ROLLBACK ALONG WITH COMMIT.WHAT IS THE SYNTAX TO CODE COMMIT AND ROLLBACK FOR EVERY 100 ROWS.AND HOW THE CURSOR ROLLBACK TO THE LAST COMMITTING POINT.

2979


Define predicate?

867


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?

8326


Give a brief description of db2 isolation levels?

798


How do I copy a table in db2?

760


What is the maximum size of varchar data type in db2?

860


Explain the contention situations caused by locks?

805


How many types of page locks can be held in db2?

814


Which command is used to remove all rows from a table?

783


When reorg is used?

866


What is the role of schema in the db2 database?

911


How would you find out the total number of rows in a db2 table?

789


What is dbrm library?

796


What is buffer pool?

849


What parameters are used to control the free space in DB2?

846