Out of curiosity I'm attempting to use the COMMENT statement in a PL/SQL block. I'm using Oracle APEX 18.2 on an Oracle 11g database and in SQL Workshop I am able to execute the command by itself, but if I wrap it in a BEGIN ... END block then I get an error message like:
ORA-06550: line 4, column 18: PLS-00103: Encountered the symbol "ON" when expecting one of the following: : = . ( @ % ;
Example of command that works:
COMMENT ON COLUMN employees.job_id IS 'comment';
Example of command that results in the error message:
BEGIN
COMMENT ON COLUMN employees.job_id IS 'comment';
END;
I assume that COMMENT isn't a permitted statement in a stored procedure but I haven't been able to find evidence to back this up. Am I correct and if so is this documented anywhere?
Thanks to @GMB for an answer with written example.
Consider:
db<>fiddle here