Cursors pl sql updating

15-Nov-2017 06:47

Explicit Cursor which are construct/manage by user itself call explicit cursor.

User itself to declare the cursor, open cursor to reserve the memory and populate data, fetch the records from the active data set one at a time, apply logic and last close the cursor.

You can not directly assign value to an explicit cursor variable you have to use expression or create subprogram for assign value to explicit cursor variable.

A cursor is a temporary work area created in the system memory when a SQL statement is executed.

Typically, each block performs a logical action in he program.

A block has the following structure: DECLARE /* Declarative section: variables, types, and local subprograms.

You also mentioned that you are updating rows in another table in your cursor's loop. Finally, are you sure that you cannot perform this as one simple SQL statement rather than updating in a cursor's loop?

For instance, I might have the following psuedo code: Excuse my psuedo code off the top of my head.

Explicit cursors are SELECT statements that are DECLAREd explicitly in the declaration section of the current block or in a package specification.They must be created when you are executing a SELECT statement that returns more than one row.