会话级别临时表
create global temporary table student(stu_id number,class_id number,stu_name varchar2(8) ) on commit preserve rows ;
step 1:
insert into student values()
step 2:
commit;
student表中还有数据
只有当会话结束后,临时表中的数据才会被截断(truncate table,即清空数据 )
事务级别临时表
create global temporary table student(stu_id number,class_id number,stu_name varchar2(8) ) on commit delete rows;
step 1:
insert into student values()
step 2:
commit; --或者rollback
student表中没有数据
create global temporary table student(stu_id number,class_id number,stu_name varchar2(8) ) on commit preserve rows ;
step 1:
insert into student values()
step 2:
commit;
student表中还有数据
只有当会话结束后,临时表中的数据才会被截断(truncate table,即清空数据 )
事务级别临时表
create global temporary table student(stu_id number,class_id number,stu_name varchar2(8) ) on commit delete rows;
step 1:
insert into student values()
step 2:
commit; --或者rollback
student表中没有数据
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/30201626/viewspace-1586130/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/30201626/viewspace-1586130/