About me:Oracle ACE pro,optimistic,passionate and harmonious. Focus on ORACLE,MySQL and other database programming,peformance tuning,db design, j2ee,Linux/AIX,Architecture tech,etc
全部博文(169)
分类: Oracle
2022-04-12 08:43:10
SQL> CREATE OR REPLACE PROCEDURE test_prc(var1 IN number,var2 OUT NUMBER) 2 AS 3 BEGIN 4 var2 := var1+1; 5 END; 6 / Procedure created SQL> SQL> CREATE OR REPLACE FUNCTION test_func(var1 IN NUMBER) 2 RETURN NUMBER 3 AS 4 var2 NUMBER; 5 BEGIN 6 test_prc(var1,var2); 7 RETURN var2; 8 END; 9 / Function created SQL> SELECT test_func(1) FROM dual; TEST_FUNC(1) ------------ 2 |