我在 PL/SQL 中有如下函数(在 Oracle APEX 中使用):
create or replace FUNCTION User_Levels(result OUT VARCHAR2)
RETURN VARCHAR2 IS
v_user_types employee.user_type%TYPE;
BEGIN
SELECT user_type
INTO v_user_types
FROM Employee
WHERE upper(username) = v('APP_USER');
IF v_user_types = 1
THEN
result := 'TRUE';
ELSE
result := 'FALSE';
END IF;
END User_Levels;
我如何调用它只是为了在普通 SQL 中查看它的当前输出,即它在运行时是否评估为 True 或 False。
我真的需要名为结果的 OUT 参数吗?