首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > oracle >

请问个存储过程的异常有关问题

2012-04-14 
请教个存储过程的错误问题isstrvarchar2(8)beginselect typeinto strfrom orderswhere Yournumbers 0

请教个存储过程的错误问题
is
  str varchar2(8);
begin
 select type
  into str
  from orders
  where Yournumbers ='0' and id='3';

insert into ......//这里省略  
end D101_text;
---------------
这个存储过程在运行时:第 1 行出现错误: ORA-01403: 未找到任何数据
然后where语句变为where id='3',这样就可以运行。但是Yournumbers ='0' and id='3'条件的记录也是存在的,为什么有“未找到任何数据”的错误呢?
程序中需要用到Yournumbers ='0' and id='3';这两个条件。

[解决办法]
SELECT * from orders 
where Yournumbers ='0' and id='3';
这句话你在数据库里能查到数据吗?
如果不能就说明你数据库里就没有满足这2个条件的数据。

热点排行
Bad Request.