Skip to content
Advertisement

Adding output to function PL/SQL

I am trying to get my function to include the date and current user, but I keep getting an error that my function is in an invalid state. If I comment out or remove the two dbms_output… lines it works just fine. Any ideas of how to return that output? Using Oracle SQL Developer

Advertisement

Answer

You have to declare the result Variable first, also enable the dbms_output on your SQL Developer.

This should work.

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement