标签:bcg iis ORC 功能 内容 icc int ota test
SQL> conn test/test Connected. SQL> desc test; Name Null? Type ----------------------------------------- -------- ---------------------------- ID NUMBER NAME VARCHAR2(10)
SQL> conn / as sysdba Connected. SQL> create global temporary table session_test on commit preserve rows as select * from test.test; Table created.
SQL> commit; Commit complete.
SQL> select * from session_test; ID NAME ---------- ---------- 0 orcl 1 orcl 3 orcl 2 orcl
退出并重新进入,并验证表内容是否存在。
SQL> exit
……
SQL> select * from session_test; no rows selected SQL>
接下来创建事务级别的临时表
SQL> create global temporary table transaction_test on commit delete rows as select * from test.test; Table created.
SQL> select * from transaction_test; no rows selected
接下来添加数据到事务临时表 transaction_test
SQL> insert into transaction_test select * from test.test; 4 rows created. SQL> select * from transaction_test; ID NAME ---------- ---------- 0 orcl 1 orcl 3 orcl 2 orcl
如上我们将 test.test 表的内容插入到了 transaction_test 表中,然后直接查询,能查到刚刚插入的数据。
接下来提交,并查询。(提交相当于提交事务,也就是一个事务的结束)
SQL> select * from transaction_test; ID NAME ---------- ---------- 0 orcl 1 orcl 3 orcl 2 orcl SQL> commit; Commit complete. SQL> select * from transaction_test; no rows selected
由此可见
标签:bcg iis ORC 功能 内容 icc int ota test
原文地址:https://www.cnblogs.com/black-start/p/11007967.html