A cursor is a multi-row query, which lets you name a work area and access its stored information. You create database package cursors on the Cursors tab of a database package using the Add a Row tool.
In addition to the standard Name, Code, and Comment, a database package cursor has the following properties:
Property |
Description |
---|---|
DB Package |
Name of the database package to which the cursor belongs. |
Return Data Type |
Allows you to define the data type of a cursor result value. |
Public |
Allows you to declare the cursor in the package specification and to permit use from outside the database package. A private cursor (check box deselected) is only defined in the package body. |
Parameters – Lists the input and output parameters required by the cursor (see Database Package Parameters).
Definition - lets you define the cursor. You can use operators and functions to insert script items into the cursor definition.
Select empno, empname, job FROM emp WHERE deptno=20 and empno = num ;