解决方法 两个DECLARE之间加上/ 注意:/单独占用一行,且前面要顶格,无空格。
--创建容器临时表 DECLARE exist number; begin select count(1) into exist from user_tables t where t.table_name = 'TEMP_YRYD_RQ'; if exist = 0 then execute immediate 'create table TEMP_YRYD_RQ( rqid VARCHAR2(255),rqmc VARCHAR2(255),cxtj VARCHAR2(255) )'; end if; execute immediate 'delete from TEMP_YRYD_RQ'; end; / --插入数据 DECLARE exist number; begin select count(1) into exist from user_tables t where t.table_name = 'TEMP_YRYD_RQ'; if exist = 0 then execute immediate 'create table TEMP_YRYD_RQ( rqid VARCHAR2(255),cxtj VARCHAR2(255) )'; end if; execute immediate 'delete from TEMP_YRYD_RQ'; end;