ORACLE 不应该蹦出一个 NO_DATA_FOUND ! 太不好使用了 !
解决方案 »
- 提问的智慧补充
- 逻辑与运算!
- 用户权限设置问题求教
- 求救:Oracle Linux环境下,大数据量的导入!
- oracle简单问题(sqldeveloper的使用)
- 求助: 将sqlserver2000中的表导入到oracle中的问题
- oracle怎样建库?不用助手,手工建库,求建库脚本
- 请问从sql server2000的数据库移植到Oracle8时, 在些语句上, 有哪些是需要变化的?
- 如何用oracle定时创建表和拷贝数据?
- Oracle 有没有求最大值的函数?SELECT MAX (1, 0, -1) FROM DUAL
- 100分问一个简单问题!!!!!
- oracle里为什么没有布尔类型呢
SELECT a.class_code into economic_class_code
FROM T_EQUIP_STANDARD a
where in_class_code like a.yes_include
and (instr( a.not_include, class_code_len3 ) = 0
and instr( a.not_include, class_code_len4 ) = 0 )
and ( a.class_level > 2 ) ;
Return '3333-000' ;
exception
when no_data_found then
Return '0000-000' ;
end;
-- ----------
1 ?SQL> declare
2 num number;
3 begin
4 select count(1) into num from aa;
5 if sql%found then
6 dbms_output.put_line('有记录');
7 else
8 dbms_output.put_line('没有记录');
9 end if;
10 end;
11 /
有记录