Oracle 预定义异常标识符
2017-03-21 21:37
190 查看
-- 预定义异常标识符
例:
declare
v_name tg_test_user.tg_test_username%type;
begin
select tg_test_username into v_name from tg_test_user where tg_test_userid=3;
dbms_output.put_line('用户名:'||v_name);
exception
when no_data_found then -- 当执行查询语句未返回行触发
dbms_output.put_line('该用户不存在');
end;
例:
declare
v_name tg_test_user.tg_test_username%type;
begin
select tg_test_username into v_name from tg_test_user where tg_test_userid=3;
dbms_output.put_line('用户名:'||v_name);
exception
when no_data_found then -- 当执行查询语句未返回行触发
dbms_output.put_line('该用户不存在');
end;
相关文章推荐
- MFC 错误异常,用vs添加资源并为资源定义类后报错:error C2065 : 未声明的标识符
- 21个Oracle预定义异常
- 【Oracle】PL/SQL 非预定义异常、自定义异常处理、RAISE_APPLICATION_ERROR
- Oracle预定义的21个系统异常类型
- MFC 错误异常,用vs添加资源并为资源定义类后报错:error C2065 : 未声明的标识符
- 预定义说明的 oracle 异常
- Oracle预定义的21个系统异常类型
- 【Oracle】PL/SQL 非预定义异常、自定义异常处理、RAISE_APPLICATION_ERROR
- 【Oracle】Oracle预定义的几种系统异常及其产生原因
- Oracle 10g处理例外(即sql异常)学习二——自定义例外和非预定义例外
- Oracle预定义的21个系统异常类型
- oracle 10g控制台登录出现Io 异常:Unknown host specified 或ORA-12154 TNS无法解析指定的连接标识符等
- oracle常见预定义异常
- Oracle PL/SQL 非预定义异常、自定义异常处理、RAISE_APPLICATION_ERROR
- oracle异常(预定义异常,自定义异常)应用介绍
- oracle异常(预定义异常,自定义异常)
- Oracle预定义的21个系统异常类型
- oracle学习之:常用预定义异常
- Oracle预定义的21个系统异常类型!
- Oracle 10g处理例外(即sql异常)学习一——预定义例外,即常见例外