Executing the following script (F5) in SQL Developer:
CREATE OR REPLACE FUNCTION "FOO"."BAR"
...
END BAR;
GRANT EXECUTE ON "FOO"."BAR" TO PUBLIC;
Will create the function, but embedded the GRANT line to the function (causing it to be in an invalid state), rather than actually performing the GRANT on the function.
The GRANT will work as expected if it is executed in a different SQL Developer window/session, however.
This works as expected if executed in SQL*Plus:
CREATE OR REPLACE FUNCTION "FOO"."BAR"
...
END BAR;
/
GRANT EXECUTE ON "FOO"."BAR" TO PUBLIC;
/
This syntax doesn’t work in SQL Developer.
Is there a way to combine these commands in a way that they can be correctly executed in SQL Developer?
try to use slashes in SQL Developer too, just like in sqlplus