How to fix the Oracle error PLS-00372: In a procedure, RETURN statement cannot contain an expression?
In this post, you’ll learn more about the Oracle ErrorPLS-00372: In a procedure, RETURN statement cannot contain an expression with the details on why you receive this error and the possible solution to fix it.
Oracle Error Description
PLS-00372: In a procedure, RETURN statement cannot contain an expression
Reason for the Error PLS-00372: In a procedure, RETURN statement cannot contain an expression
In a procedure, a RETURN statement contains an expression, which is not allowed. In functions, a RETURN statement must contain an expression because its value is assigned to the function identifier. However, in procedures, a RETURN statement simply lets you exit before the normal end of the procedure is reached.
How to fix the Error PLS-00372: In a procedure, RETURN statement cannot contain an expression ?
You can fix this error in Oracle by following the below steps
Remove the expression from the RETURN statement, or redefine the procedure as a function.
Leave Your Comment