ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 转载 :temporary table可以创建index 和view吗

转载 :temporary table可以创建index 和view吗

原创 Linux操作系统 作者:perfect_zq 时间:2011-01-02 11:02:17 0 删除 编辑

Which three statements are correct about temporary tables? (Choose three.)
A.Indexes and views can be created on temporary tables.
B.Both the data and the structure of temporary tables can be exported.
C.Temporary tables are always created in a user's temporary tablespace
D.The data inserted into a temporary table in a session is available to other sessions.
E.Data manipulation language (DML) locks are never acquired on the data of temporary tables.

Answer : A, C, E

参考别人的回答:

both are ok!

You can create indexes for temporary tables using the CREATE INDEX statement.
Indexes created on temporary tables are also temporary, and the data in the index has
the same session or transaction scope as the data in the temporary table.

You can create views that access both temporary and permanent tables. You can also
create triggers on temporary tables.

Oracle utilities can export and import the definition of a temporary table. However, no
data rows are exported even if you use the ROWS clause. Similarly, you can replicate
the definition of a temporary table, but you cannot replicate its data.
我的注释:
临时表的数据只在一个transaction或session中有效,对数据操作不需要DML锁、速度快,对临时表可以创建索引、视图、触发器。
一个用户的临时表就放在当前用户的临时表空间中,创建临时表后并不产生任何segments分配,与普通表不同。

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/25174901/viewspace-683160/ ,如需转载,请注明出处,否则将追究法律责任。

上一篇: 没有了~
请登录后发表评论 登录
全部评论
GoldenGate高级专家、专注Oracle 、Mysql 、Sql server,PGSQL、TIDB等数据库技术咨询顾问;数据迁移、大数据资源整合、NoSQL、NewSQL技术

注册时间:2011-01-01

  • 博文量
    15
  • 访问量
    43692