新手编程请帮忙 select 字段 into 变量 from .. 当查询的记录没有时出错,有什么办法? exceptionwhen sql%notfound then.... 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 加个判断不就行了select count(*) into i from ..if i>0 then...else... 试试,还没测试.select 字段 into 变量 from table_name a where exists(select 字段 from table_name where id=a.id) select nvl(a,0) into b from table where ... select nvl(a,0) into b from table where ...或者用异常处理exceptionwhen sql%notfound then.... SELECT 的异常处理应该用 NO_DATA_FOUND 来捕捉! begin select ...; exception when no_data_found then ...;end; myeclipse中JDBC调用的问题 缺失逗号 求各位高人指点 jdbc连接数据库出错,请教高手 急急急,用Oracle 写公交换乘的存储过程 查询视图和索引的语句 一个很迷惑的小问题 计算周数的问题 如何删掉一个已有的数据库? tnsnames中的数据库连接串经常会莫名其妙的丢失,请问会是什么原因? 关于外键的简单问题!!!!!!!!!!!!!!! ORACLE pl/sql 中没有没有办法知道执行的时间,I/O统计信息
select count(*) into i from ..
if i>0 then
...
else
...
select 字段 into 变量 from table_name a where exists(select 字段 from table_name where id=a.id)
when sql%notfound then
....
select ...;
exception when no_data_found then
...;
end;