12c OCP考试专项 [1z0-071]-Q12: 全局临时表(2020.06.17)

时间:2020-06-17 23:09:13   收藏:0   阅读:96

create global temporary table invoices_got(xxx)
on commit preserve rows.

insert into invoices_got values(1,100);

commit;

A. The session can add columns.
B. The session can add foreign keys.
C. Other sessions can view the committed row.
D. when you terminated your session, the row will be deleted.

Answer: D

Explanation:

关键字 on commit preserve rows.创建了一个基于会话的临时表;插入一行数据;提交;数据只会在当前会话看到,其他会话看不到,如果结束会话,数据被删除。
不管是基于会话的临时表,还是基于事务的临时表,只要关闭会话(关闭会话也会结束事务),数据都会被删除。

提示:答案为个人理解和解答,难免有错,也欢迎大家及时指正。

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!