PROCEDURE -------------------------------IN PARAMETER ------------------------------------CREATE OR REPLACE PROCEDURE ADD1(A NUMBER,B NUMBER) IS C NUMBER; BEGIN C:=A+B; DBMS_OUTPUT.

PUT_LINE('VALUE OF C'||C); END; BEGIN ADD1(6,4); END; OUT PARAMETER ----------------------------------------CREATE OR REPLACE PROCEDURE ADD6(A NUMBER,B NUMBER,C OUT NUMBER) IS BEGIN C:=A+B; DBMS_OUTPUT.PUT_LINE('VALUE OF C'||C); END; declare x number; BEGIN ADD6(5,5,X); END; IN OUT PARAMETER ----------------------------------CREATE OR REPLACE PROCEDURE ADD3(A IN OUT NUMBER) IS BEGIN A:=A*A; END; DECLARE X NUMBER(5):=5; BEGIN ADD3(X); DBMS_OUTPUT.PUT_LINE(X); END; EXAMPLE OF PROCEDURE USONG CURSOR ----------------------------------------------------CREATE OR REPLACE PROCEDURE DATA( A NUMBER) IS --DECLARE v_eno employees.employee_id%type; v_ename employees.first_name%type; v_job employees.job_id%type; cursor emp_cur is select employee_id,first_name,job_id from employees;

close emp_cur.begin open emp_cur. end loop. begin data(12).v_job .put_line(v_eno || ' ' || v_ename || ' ' || v_job). for i in 1. dbms_output. end. end.A loop fetch emp_cur into v_eno..v_ename. .

Sign up to vote on this title
UsefulNot useful