Oracle 12c-Define procedure and implement logic in DECLARATION section of PLSQL block
DECLARE
emp_salary NUMBER(8,2);
PROCEDURE adjust_salary ( emp NUMBER,
sal IN OUT NUMBER,
adjustment NUMBER ) IS
BEGIN
sal := sal + adjustment;
END;
BEGIN
select amount_due_original INTO emp_salary
from ar_payment_schedules_all
where trx_number = 'XXXXX'
and payment_schedule_id = XXXX;
DBMS_OUTPUT.PUT_LINE ('Before invoking procedure, emp_salary: ' || emp_salary);
adjust_salary (100, emp_salary, 1000);
DBMS_OUTPUT.PUT_LINE ('After invoking procedure, emp_salary: ' || emp_salary);
END;
Comments
Post a Comment