ITPub博客

首页 > 数据库 > Oracle > Oracle临时表的创建

Oracle临时表的创建

原创 Oracle 作者:masheng0925 时间:2015-04-19 19:49:23 0 删除 编辑
会话级别临时表
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博客 ” ,链接:https://blog.itpub.net/30201626/viewspace-1586130/ ,如需转载,请注明出处,否则将追究法律责任。

下一篇: 使用sqlplus登录
请登录后发表评论 登录
全部评论

注册时间:2015-04-11

  • 博文量
    43
  • 访问量
    44267