原因:select a into b from table:当查询出来的a没有数据时,这个时候就会抛出这个异常:ORA-01403:no data found 解决方法: 先定义一个整形变量,countA,增加一个count(*)即使没有找到数据,也会返回0,而不是null;然后再判断countA是否大于0,如果大于0,则再执行上面的语句 declare countA integer :=0; select count(*) into countA from table; if countA>0…