Plsql PL/SQL如何在存储过程中调用存储函数
如何在存储过程中调用函数 这就是我到目前为止所做的:Plsql PL/SQL如何在存储过程中调用存储函数,plsql,Plsql,如何在存储过程中调用函数 这就是我到目前为止所做的: create or replace PROCEDURE DELETE_ALL_CUSTOMERS_VIASQLDEV( pcustid number, pcustname Varchar2) AS BEGIN DELETE_ALL_CUSTOMERS_FROM_DB(pcustid, pcustname); dbms_output.put_line('---------------------------------
create or replace PROCEDURE DELETE_ALL_CUSTOMERS_VIASQLDEV( pcustid number, pcustname Varchar2)
AS
BEGIN
DELETE_ALL_CUSTOMERS_FROM_DB(pcustid, pcustname);
dbms_output.put_line('--------------------------------------------');
dbms_output.put_line('Deleting all Customer rows');
dbms_output.put_line('999 rows deleted');
commit;
raise_application_error(-20000, 'An error was encountered' || SQLERRM);
END;
我得到的错误是:
Procedure DELETE_ALL_CUSTOMERS_VIASQLDEV compiled
LINE/COL ERROR
--------- -------------------------------------------------------------
7/4 PL/SQL: Statement ignored
7/4 PLS-00306: wrong number or types of arguments in call to 'DELETE_ALL_CUSTOMERS_FROM_DB'
Errors: check compiler log
您应该使用与以下参数相同的
从\u DB中删除\u所有\u客户\u
:
create or replace PROCEDURE DELETE_ALL_CUSTOMERS_FROM_DB( pcustid number, pcustname Varchar2)
AS
BEGIN
dbms_output.put_line('Inside');
END;
在您的帖子中添加从数据库中删除所有客户的过程。调用语句中的实际参数似乎与定义中的形式参数不同。存在其他形式参数,或者类型与为Delete_All_Customers_Viasqldev例程定义的参数类型“pcustid”和“pcustname”不对应。