ORACLe PROCEDURE - AUTHID allowed only in schema level
问题 While trying to create table via procedure, I am facing error like Error(73,9): PLS-00157: AUTHID only allowed on schema-level programs PROCEDURE BCKUP AUTHID CURRENT_USER AS statusmsg VARCHAR2(400); BEGIN --Backup records EXECUTE IMMEDIATE 'CREATE TABLE schemaname.tabname AS SELECT pgm.* FROM XYZ pgm, IJK prf WHERE prf.col1=pgm.col1 AND prf.ID IN(SELECT ID FROM TAB2)'; COMMIT; EXCEPTION WHEN OTHERS THEN statusmsg :='SQL ERRROR CODE ' || SQLCODE|| ' -ERROR- ' ||SQLERRM; dbms_output.put_line(