Chinaunix首页 | 论坛 | 博客
  • 博客访问: 91883787
  • 博文数量: 19283
  • 博客积分: 9968
  • 博客等级: 上将
  • 技术积分: 196062
  • 用 户 组: 普通用户
  • 注册时间: 2007-02-07 14:28
文章分类

全部博文(19283)

文章存档

2011年(1)

2009年(125)

2008年(19094)

2007年(63)

分类: Oracle

2008-04-30 17:37:42

示例:
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

阅读(389) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~