1、存储过程中动态创建表失败,提示权限问题,execute immediate 'create global temporary t1 as select * from table1';
解决:
1-授权 create any table
2-存储过程中加AUTHID CURRENT_USER
2、创建完全局临时表数据查询为空,需要用到临时表的类型知识,加关键字on commit preserve rows即可
3、删除时候遇到问题
失败:
14452, 00000, "attempt to create, alter or drop an index on temporary table already in use"
// *Cause: An attempt was made to create, alter or drop an index on temporary
// table which is already in use.
// *Action: All the sessions using the session-specific temporary table have
// to truncate table and all the transactions using transaction
// specific temporary table have to end their transactions.
解决:
truncate后drop