temp表学习笔记:
create global temporary table temp_table_session
on commit preserve rows
as
select * from scott.emp where 1=0
create global temporary table temp_table_transaction
on commit delete rows
as
select * from scott.emp where 1=0
/
insert into temp_table_session select * from scott.emp;
insert into temp_table_transaction select * from scott.emp;
select session_cnt, transaction_cnt
from ( select count(*) session_cnt from temp_table_session ),
( select count(*) transaction_cnt from temp_table_transaction );
HR 30-1月 -08 >select session_cnt, transaction_cnt
2 from ( select count(*) session_cnt from temp_table_session ),
3 ( select count(*) transaction_cnt from temp_table_transaction );
SESSION_CNT TRANSACTION_CNT
----------- ---------------
14 0
HR 30-1月 -08 >disc
从 Personal Oracle Database 10g Release 10.1.0.2.0 - Production
With the Partitioning, OLAP and Data Mining options 断开
30-1月 -08 >conn hr/hr
已连接。
HR 30-1月 -08 >select session_cnt, transaction_cnt
2 from ( select count(*) session_cnt from temp_table_session ),
3 ( select count(*) transaction_cnt from temp_table_transaction );
SESSION_CNT TRANSACTION_CNT
----------- ---------------
0 0
意思自己理解,只是将学习的东西记录下来。回头有脚本可看。
[@more@]来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/564597/viewspace-998742/ ,如需转载,请注明出处,否则将追究法律责任。