Pages

Pages

Parametric cursor.

Parametric cursor:
  • The cursor defined with parameter is called parametric cursor.
  • Cursor parameters can be assigned with default values.
  • The Mode of cursor parameters can be only “IN” Mode.
Syntax:
CURSOR Cursorname(ParameterName Datatype,…)
IS
SELECT statement;
Illustration
SQL>DECLARE
CURSOR Empcursor
    (pdeptno NUMBER,
    Pjob VARCHAR2) IS
SELECT empno,ename
FROM emp
WHERE deptno=Pdeptno AND job=Pjob;



 Click here to go to Back page

No comments:

Post a Comment