aiaiDBA

加微信获取免费职业规划+学习资料,了解年薪50万的DBA是如何练成的

13718043309

010-86462881

PLS-00251: RETURN, for actual function return, must be last in the parameters clause

PLS-00251: RETURN, for actual function return, must be last in the parameters clause
Cause: RETURN specification for the actual function return, used within the parameters clause must hold the very last position. Example : The following will give this error since the RETURN specification for the actual function return in the parameters clause is not the last. FUNCTION myexternalfunc (var1 BINARY_INTEGER, var2 BINARY_INTEGER) RETURN BINARY_INTEGER IS EXTERNAL NAME "myexternalfunc" LIBRARY somelib PARAMETERS (var1 LONG, var2 SHORT, RETURN INT, RETURN INDICATOR SHORT); The correct syntax is the following. Note that RETURN for actual function return is the last specification in the parameters clause. FUNCTION myexternalfunc (var1 BINARY_INTEGER, var2 BINARY_INTEGER) RETURN BINARY_INTEGER IS EXTERNAL NAME "myexternalfunc" LIBRARY somelib PARAMETERS (var1 LONG, var2 SHORT, RETURN INDICATOR SHORT, RETURN INT);
Action: Correct the syntax of the RETURN specification in the parameters clause

请先 登录 后评论

1 个回答

小智
PLS-00251:RETURN,对于实际的函数返回,必须在parameters子句中最后,
.原因: RETURN规范对于实际的函数返回,在参数子句中使用必须保持最后的位置。示例:以下将给出此错误,因为在参数子句中实际函数返回的RETURN规范不是最后的。FUNCTION myexternalfunc(var1 BINARY_INTEGER,var2 BINARY_INTEGER)RETURN BINARY_INTEGER是外部名称“myexternalfunc”LIBRARY somelib参数(var1 LONG,var2 SHORT,RETURN INT,RETURN INDICATOR SHORT); 正确的语法如下。请注意,实际函数返回的RETURN是parameters子句中的最后一个规范。FUNCTION myexternalfunc(var1 BINARY_INTEGER,var2 BINARY_INTEGER)RETURN BINARY_INTEGER是外部名称“myexternalfunc”LIBRARY somelib参数(var1 LONG,var2 SHORT,RETURN INDICATOR SHORT,,
.操作:在parameters子句中更正RETURN规范的语法,
.
请先 登录 后评论