create procedure proasstr varchar2 (100); beginstr: = 'CREATE GLOBAL TEMPORARY TABLE TABLENAME (COL1 VARCHAR2 (10), COL2 NUMBER) ON COMMIT PRESERVE ROWS'; execute immediate str; - is performed using dynamic SQL statements end; /
The DDL statement cannot be used directly in the stored procedure, so you can only use dynamic SQL statements. Description Temporary Table is specified by sessions, and Oracle will truncate the table when the session is interrupted. Create Global Temporary Table Admin_Work_Area On Commit Delete Rows As SELECT * FROM DEPT