示例: create or replace procedure pro_test_exception(vid in varchar2) is userName varchar2(30); begin select name into userName from t_user where id=vid; dbms_output.put_line(userName); exception when no_data_found then dbms_output.put_line('没有查到数据!'); when too_many_rows then dbms_output.put_line('返回了多行数据!'); end pro_test_exception; |
原文:http://leafnode.blog.ccidnet.com/blog-htm-itemid-132826-do-showone-type-blog-uid-43034.html
阅读(421) | 评论(0) | 转发(0) |