有时,在 PL SQL 中,您希望将参数添加到包、函数或过程中,以便为将来的功能做准备。例如:
create or replace function doGetMyAccountMoney( Type_Of_Currency IN char := 'EUR') return number
is
Result number(12,2);
begin
Result := 10000;
IF char <> 'EUR' THEN
-- ERROR NOT IMPLEMENTED YET
END IF;
return(Result);
end doGetMyAccountMoney;also
它会导致很多警告,比如
Compilation errors for FUNCTION APPUEMP_PRAC.DOGETMYACCOUNTMONEY
Error: Hint: Parameter 'Currency' is declared but never used in 'doGetMyAccountMoney'
Line: 1
避免这些警告的最佳方法是什么?
最佳答案
我相信这是由参数 PLSQL_WARNINGS 控制的,在此处针对 10gR2 进行了记录:http://download.oracle.com/docs/cd/B19306_01/server.102/b14237/initparams166.htm#REFRN10249
关于oracle - 如何避免 PL SQL 中未使用参数的警告?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/84661/