oracle如何在包里创建函数与过程
发布网友
发布时间:2022-04-28 21:34
我来回答
共1个回答
热心网友
时间:2022-04-09 15:20
create or replace package Package_Name is
PROCEDURE Main( errbuf OUT VARCHAR2
,retcode OUT NUMBER
,parameter1 IN varchar2
);
FUNCTION function_name (parameter1 IN NUMBER)
RETURN NUMBER;
end Package_Name;
---------
create or replace package body Package_name is
PROCEDURE MAIN(errbuf OUT VARCHAR2
,retcode OUT NUMBER
,parameter1 IN VARCHAR2
)
IS
BEGIN
............
END MAIN;
FUNCTION function_name (parameter IN NUMBER)
RETURN NUMBER
IS
x_cnt NUMBER:=0;
BEGIN
SELECT count(*)
INTO x_cnt
FROM al
return(x_cnt);
END function_name;
end Package_name;
;
你最好使用PL/SQL Develop 创建包