aiaiDBA

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

13718043309

010-86462881

PLS-00705: exception 'string' used in expression requiring return type

PLS-00705: exception 'string' used in expression requiring return type
Cause: An exception was referred to in an expression. Exceptions have names but not values and therefore cannot contribute values to an expression. For example, the following RETURN statement is illegal: FUNCTION credit_limit (cust_no INTEGER) RETURN NUMBER IS limit NUMBER; over_limit EXCEPTION; ... BEGIN ... RETURN over_limit; -- illegal END;
Action: Check the spelling of the identifiers in the expression, then rewrite the expression so that it does not refer to an exception.

请先 登录 后评论

1 个回答

小智
PLS-00705:表达式中使用的异常' string '需要返回类型,
.原因:表达式中引用了异常。异常具有名称而不是值,因此无法为表达式贡献值。例如,以下RETURN语句是非法的:FUNCTION credit_limit(cust_no INTEGER)返回值为NUMBER; 超限 ... BEGIN ... RETURN over_limit; - 非法END,
.操作:检查表达式中标识符的拼写,然后重写表达式,使其不引用异常。,
.
请先 登录 后评论