您的位置:首页 > 数据库 > Oracle

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;
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: