Follow Our FB Page << >> for Daily Laughter. We Post Funny, Viral, Comedy Videos, Memes, Vines...

cursor with hold explain ?

cursor with hold explain ?..

Answer / ratheesh nellikkal

Hi All,
Cursor is nothing but a pointer to a result set that you
get as a result of executing a query.
So if u wanna some operations using this cursor then u have
1. Declare a cursor
2.Open the cursot before the first access
3.Do the operations
4.Close the cursor.

But in case of a normal cursor (not declared with 'with
hold' option) in between the operations if u issued a
commit command then the cursor will be getting closed and
if u wanna access it again then u should open it again.

But incase of a 'With hold' cursor it will maintane the
states if you issed a commit also.
Means it will not get closed by applying frequent commit.

Ratheesh Nellikkal

Is This Answer Correct ?    8 Yes 0 No

Post New Answer

More DB2 Interview Questions

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

0 Answers  

why we create view.

5 Answers  

How do I create a view in db2?

0 Answers  

how will i display the duplicate record's from a table... i don't want to eliminate ...i want to display the duplicate record...for example in my table i have 10 record's like record no(1,2,3,4,2,9,6,1) in this i want to receive duplicates...

1 Answers   UST,

how to execute qcmdexc in rpgle?plz write code also?

1 Answers   IBM,

How can you split a table in to exactly half?

7 Answers   HSBC,

How do I delete a table in database?

0 Answers  

What is the difference between IN subselects and EXISTS subselect?

1 Answers   HCL, PreVator, TCS,

What is the difference between nvl and coalesce?

0 Answers  

What is pagespace?

1 Answers  

What are host variables in db2?

0 Answers  

How does one bind 2 versions of a CICS transaction with the same module name in two different CICS regions that share the same DB2 subsystem?

2 Answers