到目前为止我还没有在过程中操作过blob。不过向你提供的select语句当没有满足条件的信息时,是会抛出异常的。所以在使用select into时,最好在过程捕获一下异常,如下: create or replace test_proc as l_b varchar2(10); begin select a into 1_b from table; exception when others then null;end;
create or replace test_proc as l_b number:=0; being select count(*) into b from table where a is not null; if(b >0 )then --进行你的处理 l_b :=0;--再把l_b赋值为0 end if; end;
create or replace test_proc
as
l_b varchar2(10);
begin
select a into 1_b from table;
exception
when others then
null;end;
as
l_b number:=0;
being
select count(*) into b from table where a is not null;
if(b >0 )then
--进行你的处理
l_b :=0;--再把l_b赋值为0
end if;
end;
这个情况可能对你的案例不适用,不过如果你的表中还有其他字段的话,可以通过带条件的查询(该条件可以区分每条记录)。
如果查询到了l_b>0了然后再根据唯一条件查询出a的内容。