Package skeleton #2 |
CREATE OR REPLACE PACKAGE TEST_PKG IS MyInstance varchar2(50); PROCEDURE proc_test; END TEST_PKG; / CREATE OR REPLACE PACKAGE BODY TEST_PKG IS PROCEDURE proc_test is BEGIN SELECT instance_name INTO MyInstance from v$instance ; dbms_output.put_line('Your instance name is: ' || MyInstance ) ; EXCEPTION WHEN NO_DATA_FOUND THEN dbms_output.put_line('No Instance Name found') ; END proc_test; END TEST_PKG; / set serverout on exec TEST_PKG.proc_test; |