I expect the following code to print 'abc' before returning 1.
Even though I ran set serveroutput on, it still doesn't print anything.
If, instead of a function, it would be a procedure, it would work.
Can somebody explain to me what I am doing wrong?
Thanks.
CREATE OR REPLACE FUNCTION test (
code NUMBER
) RETURN NUMBER
IS
BEGIN
dbms_output.put_line('abc');
RETURN 1;
END;
SELECT
test(30)
FROM
dual;
DBMS_OUTPUT.PUT_LINE(). What business reason do you have for executing this? There's almost never a need for this in production code.abcmessage after you run acommit?