Collections:
Use "IN OUT" Parameters in Oracle
How To Use "IN OUT" Parameter Properly in Oracle?
✍: FYIcenter.com
Here are the rules about IN OUT parameters:
Here is good example of a procedure with IN OUT parameters:
SQL> CREATE OR REPLACE PROCEDURE SWAP_TEST AS
2 A NUMBER := 3;
3 B NUMBER := 8;
4 PROCEDURE MY_SWAP(X IN OUT NUMBER,Y IN OUT NUMBER) AS
5 T NUMBER;
6 BEGIN
7 T := X;
8 X := Y;
9 Y := T;
10 END MY_SWAP;
11 BEGIN
12 MY_SWAP(A,B);
13 DBMS_OUTPUT.PUT_LINE('A = ' || TO_CHAR(A));
14 DBMS_OUTPUT.PUT_LINE('B = ' || TO_CHAR(B));
15 END;
16 /
SQL> EXECUTE SWAP_TEST;
A = 8
B = 3
⇒ Define Default Values for Formal Parameters in Oracle
⇐ Use "OUT" Parameters in Oracle
2018-10-19, 4577🔥, 0💬
Popular Posts:
What Is Program Global Area (PGA) in Oracle? A Program Global Area (PGA) is a memory buffer that is ...
What Are the Differences between BINARY and VARBINARY in MySQL? Both BINARY and VARBINARY are both b...
How to check if two JSON values have overlaps using the JSON_OVERLAPS() function? JSON_OVERLAPS(json...
How To Assign Debug Privileges to a User in Oracle? In order to run SQL Developer in debug mode, the...
How Run SQL*Plus Commands That Are Stored in a Local File in Oracle? If you have a group of commands...