既然是临时表,为什么还要删掉?会话级的临时表创建方法:create global temporary table table_name(col1 type1,col2 type2...) on commit preserve rows;举例create global temporary table student(stu_id number(5),class_id number(5),stu_name varchar2(8),stu_memo varchar2(200)) on commit preserve rows ;事务级临时表的创建方法:create global temporary table table_name(col1 type1,col2 type2...) on commit delete rows;举例:create global temporary table classes(class_id number(5),class_name varchar2(8),class_memo varchar2(200)) on commit delete rows ;你可以创建基于session和基于事务的临时表,基于session的临时表当你session断开,表中数据将被自动删除。
解决方案 »
- 在oracle 中联合做主键的问题??请大家帮帮忙,谢谢
- 请指点
- 关于Forms Builder 开发
- rollback的嵌套问题 ,请大虾指教
- 怎样把Excel 中的资料导入到oracle中呢
- oracle9i中怎么看SQL语法帮助
- 系统提示:没有发现客户端与网络组件。怎么解决?
- 多个数据库的字符集问题
- 如何在WIN2000专业版中重新安装Microsoft OLE DB Provider for Oracle驱动程序?在线等...
- 请问oracle里面,怎么把一个表的blob字段插入到另外一个表的blob中?
- sqlplus有关问题--在线等待
- pctfree和PCTUSDE两个参数怎么看,我用show 怎么看不到
execute immediate 'create global temporary table t(col1 ...)';
...;
commit;
execute immediate 'drop table t';
就按照你创建的这个,我如果在后面:select * from t,在编译时就会有表名不存在的错误提示。
authid current_user