create global temporary tablename(column list)
on commit perserve rows; --提交保留数据,会话临时表
on commit delete rows;  --提交删除数据,事务临时表

解决方案 »

  1.   

    sqlstr='create table tempdelete as select bs from tbparam where name='''||pname||''' '||and bs in (select bs from tbbase);execute immediate sqlstr;delete from tbbase where bs in (select bs from tempdelete);sqlstr='drop table tempdelete';execute immediate sqlstr;
      

  2.   

    阿涛是写在存储过程中的马。。?
    怎么是MGR-00072: There is no more information about this error.lilygy5(我爱oracle) 的办法不是看到很懂。。Create table tbxxxxx as select .............这个直接执行可以,放到
    存储过程中就不灵啦。。存储过程中联执行这样的语句都error?
    create or replace procedure testtest is
    begin 
     select * from test2;
    end testtest;There is no more information about this error.
      

  3.   

    存储过程不能Create table ,select的吗?真的晕了。
      

  4.   

    PL/SQL可以执行DDL。用动态SQL。
    先定义个字符串,比如SQLSTR,然后用下列语句
    execute immediate SQLSTR只是连接字符串的时候注意字符串标记符号'的问题就可以了。
      

  5.   

    老大详细点阿。。
    我试了是错误的阿
    strstr varchar(200);
    strstr:='select * from test';
    错误了。