Oracle临时表(Temporary Table)
2015-06-27 00:08
671 查看
GLOBAL TEMPORARY代表全局临时表
临时表的元数据存储在数据字典里面
只当第一条DML命令发生的时候才为这张表的段分配空间
临时表数据的可见范围应该是会话级别或是事务级别的
会话或者事务级别又建表时的ON COMMIT关键字决定,ON COMMIT DELETE ROWS代表事务级别,ON COMMIT PERSERVE ROWS代表会话级别
DDL命令只在临时表与会话断开绑定之后才可以运行
对于会话级别,当TRUNCATE命令发生时会话与临时表间的绑定也就断开了;而对于事务级别,在ROLLBACK或者COMMIT
Oracle临时表的一些限制:
■ Temporary tables cannot be partitioned, clustered, or index organized.
■ You cannot specify any foreign key constraints on temporary tables.
■ Temporary tables cannot contain columns of nested table.
■ You cannot specify the following clauses of the LOB_storage_clause:
TABLESPACE, storage_clause, or logging_clause.
■ Parallel UPDATE, DELETE and MERGE are not supported for temporary tables.
■ You cannot specify the nested_table_col_properties or parallel_
clause.
■ The only part of the segment_attributes_clause you can specify for a
temporary table is TABLESPACE.
■ Distributed transactions are not supported for temporary tables.
临时表的元数据存储在数据字典里面
只当第一条DML命令发生的时候才为这张表的段分配空间
临时表数据的可见范围应该是会话级别或是事务级别的
会话或者事务级别又建表时的ON COMMIT关键字决定,ON COMMIT DELETE ROWS代表事务级别,ON COMMIT PERSERVE ROWS代表会话级别
DDL命令只在临时表与会话断开绑定之后才可以运行
对于会话级别,当TRUNCATE命令发生时会话与临时表间的绑定也就断开了;而对于事务级别,在ROLLBACK或者COMMIT
Oracle临时表的一些限制:
■ Temporary tables cannot be partitioned, clustered, or index organized.
■ You cannot specify any foreign key constraints on temporary tables.
■ Temporary tables cannot contain columns of nested table.
■ You cannot specify the following clauses of the LOB_storage_clause:
TABLESPACE, storage_clause, or logging_clause.
■ Parallel UPDATE, DELETE and MERGE are not supported for temporary tables.
■ You cannot specify the nested_table_col_properties or parallel_
clause.
■ The only part of the segment_attributes_clause you can specify for a
temporary table is TABLESPACE.
■ Distributed transactions are not supported for temporary tables.
相关文章推荐
- ORACLE 索引,索引的建立、修改、删除
- 【Oracle】Oracle11gR2在各种系统中的安装参考文档链接
- oracle练习
- oracle异常
- oracle游标介绍
- Oracle 存储过程实例2
- oracle 归档日志满 的 解决方法
- java、oracle、jsp中string与date与sql.date的转换
- [SQL SERVER] 如何linked server連接Oracle (Oracle Provider for OLE DB)
- Oracle表与索引的分析及索引重建
- oracle在impdp时报ORA-31655和ORA-39154
- oracle 使用 UTL_FILE 导出表数据到txt文件
- oracle 优化小技巧, filter 与 hash join 连接
- Mac OS X (Intel) 上安装 Oracle 10g
- mac os 下安装oracle 客户端
- ORACLE数据库中查找用户、角色、权限的SQL汇总(转发)
- Oracle基础学习登陆SQLPLUS(一)
- Oracle 进程结构
- 三层嵌套oracle数据库记录分页sql语句
- oracle调用JAVA类的方法