Can PL/SQL procedure in Oracle know it’s own name?
Let me explain:
CREATE OR REPLACE procedure some_procedure is v_procedure_name varchar2(32); begin v_procedure_name := %%something%%; end;
After %%something%% executes, variable v_procedure_name should contain ‘SOME_PROCEDURE’. It is also OK if it contains object_id of that procedure, so I can look up name in all_objects.
Try:
There’s also $$PLSQL_LINE if you want to know which line number you are on.