Oracle存储过程简单实例
2012-06-18 15:26
239 查看
Oracle存储过程简单实例
/*不带任何参数存储过程(输出系统日期)*/
create or replace procedure output_date is
begin
dbms_output.put_line(sysdate);
end output_date;
/*带参数in和out的存储过程*/
create or replace procedure get_username(v_id
in number,v_username
out varchar2)
as
begin
select username into v_username from tab_user where id = v_id; --变量赋值
exception
when no_data_found then
raise_application_error(-20001,'ID不存在!');
end get_username;
/*不带任何参数存储过程(输出系统日期)*/
create or replace procedure output_date is
begin
dbms_output.put_line(sysdate);
end output_date;
/*带参数in和out的存储过程*/
create or replace procedure get_username(v_id
in number,v_username
out varchar2)
as
begin
select username into v_username from tab_user where id = v_id; --变量赋值
exception
when no_data_found then
raise_application_error(-20001,'ID不存在!');
end get_username;
相关文章推荐
- Oracle存储过程简单实例:
- C#调用oracle存储过程 最简单的实例
- C#调用oracle存储过程 最简单的实例
- C#调用oracle存储过程 最简单的实例
- C#调用oracle存储过程 最简单的实例
- oracle存储过程简单实例 变量赋值 游标遍历
- Oracle存储过程简单实例
- C#调用oracle存储过程 最简单的实例
- C#调用oracle存储过程 最简单的实例
- Oracle存储过程简单实例
- Oracle存储过程简单实例
- C#调用oracle存储过程最简单的实例
- 三大框架学习:Struts2简单入门(通过一个简单的登陆实例详解)
- XSLT简单教程--XSLT的实例
- 一个简单实例的LR分析过程
- inux下串口编程简单实例
- Quartz的简单实例
- PyQt之玩转signal(信号)与slot(槽)一:介绍及简单实例
- CORBA Programming with TAO - 5.Hello World(简单实例)
- Android多媒体学习一:Android中Image的简单实例。