日期:2014-05-16  浏览次数:20818 次

pl/sql块错误
declare
    v_countone  int;
    begin
        select count(1)  into v_countone
        --`select count(1)
        from user_tables b
        where b.table_name='SHISHIBIAO' ;
        
       -- end;
        if(v_countone <> 0) then
            execute immediate 'drop table SHISHIBIAO';
        else
        execute immediate 'create table shishibiao
                            (
                            id int not null,
                            subject int not null,
                            begin date,
                            lend date
                            )';
           end if;    
          
           commit;
                   
        --end; 如果执行以上语句能成功
        insert into SHISHIBIAO(id,subject,begin,lend)
        values(1,1,to_date('2013-12-17','yyyy-mm-dd'),to_date('2009-11-11','yyyy-mm-dd'));
        commit;
end;
        --insert into语句和上面的放在一起就出错,查了很久都没弄清错误

------解决方案--------------------