触发器执行时发生ora-01403:未找到数据错误 select pid into temp_pid from table1 where ...我写了一个触发器,其中定义了一个temp_pid变量,我要跟据搜索条件筛选出值后赋给这个变量,然后供下面的语句使用,如果没有符合条件的值,则temp_pid为null即可。现在我是上面那样写的,可是这样写如果没有符合值的话会出错误,请问应该怎么改? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 加上一个block:beginselect pid into temp_pid from table1 where ...exception when no_data_found then temp_pid:=null;end; 先判下select count(*) from 表 where 条件。为一的时候再取 temp_pid:=null;for c in (select pid from table1 where ...) loop temp_pid:=c.pid;end loop; temp_pid 什么类型,初始值是什么? 关于周统计的问题 oracle 急求指点:EXCEL更新ORACEL 这个这么解决???? 有没有熟悉ORACLE ERP应收数据库表的大侠看过来! 如何更改物化视图的刷新时间? 多行合并一行,求高手 关于Table Lock 请帮忙:从9.0转移到8.1版本过程出错 求一个sql语句。 我有两个装了win2000 专业版与服务器版操作系统的机器,why oracle(client or server)不能装?双击安装图标没提示也没反应? 新手请教:c# winform 调用oracle存储过程 AIX下关闭和启动ORACLE !!!!!!!!在线等!!!
begin
select pid into temp_pid from table1 where ...
exception
when no_data_found then
temp_pid:=null;
end;
为一的时候再取
for c in (select pid from table1 where ...) loop
temp_pid:=c.pid;
end loop;