create or replace procedure TestProc
as
tmpCount int;
begin
select count(*) into tmpCount from tableName Where rowNum=1;
if tmpCount<1 then
insert into tableName(UseBy,Bank1,Bank2,NextId,LastUpdate) values('Get',1,1,1,sysdate);
end if;
end;
as
tmpCount int;
begin
select count(*) into tmpCount from tableName Where rowNum=1;
if tmpCount<1 then
insert into tableName(UseBy,Bank1,Bank2,NextId,LastUpdate) values('Get',1,1,1,sysdate);
end if;
end;
改成
tmpCount number(10);
试试
直接定义成number,或者binary_integer类型就不会出错了。