A Temporary Table that is treated as “VIEW” can be used in a procedure. You can refer, insert, update, or delete records in temporary tables.
Temporary tables are affected by transactions. When current transaction is rolled back, the records that saved at the previous commit are restored.
Declare Temporary Table
Declare Empty Table
DECLARE table_name VIEW (column_name [, column_name ...]);
Declare from the Result-Set of a Select Query
DECLARE table_name VIEW [(column_name [, column_name ...])] AS select_query;
Dispose Temporary Table
DISPOSE VIEW table_name;