IN, OUT, IN OUT Parameters
ExplanationOracle Fusion / EBS · Technical · PL/SQLHigh confidenceGenerated
IN passes a value in read-only; OUT passes a value back out; IN OUT does both.
How it works
IN — the default if no mode is specified — passes a value into the subprogram, read-only inside it. OUT is write-only from the caller's perspective: the parameter starts NULL inside the subprogram, and whatever it assigns is copied back to the caller's variable once the subprogram completes successfully. IN OUT does both — an initial value comes in, and a possibly modified value goes back out.
How it works
CREATE OR REPLACE PROCEDURE apply_bonus( p_salary IN NUMBER, p_bonus_pct IN NUMBER, p_new_salary OUT NUMBER ) AS BEGIN p_new_salary := p_salary * (1 + p_bonus_pct / 100); END; / DECLARE v_result NUMBER; BEGIN apply_bonus(5000, 10, v_result); DBMS_OUTPUT.PUT_LINE(v_result); -- 5500 END; /
Related questions
GroundingGenerated
Model-generated, grounded against the curated knowledge layer. Check specifics against your instance.