Skip to main content

Avoid functions with OUT parameters

Functions with OUT parameters are complex to understand. It is impossible to tell whether an argument is a input or output just by looking at the function call. Also, functions with OUT parameters cannot be called from SQL.

Noncompliant Code Example

CREATE OR REPLACE FUNCTION get_product_info(id IN NUMBER, value OUT NUMBER) RETURN VARCHAR2 IS
BEGIN
...
END;