Home > Database > Mysql Tutorial > body text

Oracle数据库操作大全(十四)pl/sql编程之存储过程

WBOY
Release: 2016-06-07 15:24:32
Original
1023 people have browsed it

存储过程: 更多Oracle资料、视频教程: http://2.taobao.com/item.htm?id=42922011874spm=686.1000925.0.0.ZVvkz6mt= 如何在Java中调用存储过程: 函数: 更多Oracle资料、视频教程: http://2.taobao.com/item.htm?id=42922011874spm=686.1000925.0.0.ZVvk

存储过程:

Oracle数据库操作大全(十四)pl/sql编程之存储过程

更多Oracle资料、视频教程:

http://2.taobao.com/item.htm?id=42922011874&spm=686.1000925.0.0.ZVvkz6&mt=


Oracle数据库操作大全(十四)pl/sql编程之存储过程

如何在Java中调用存储过程:

Oracle数据库操作大全(十四)pl/sql编程之存储过程

函数:

Oracle数据库操作大全(十四)pl/sql编程之存储过程

更多Oracle资料、视频教程:

http://2.taobao.com/item.htm?id=42922011874&spm=686.1000925.0.0.ZVvkz6&mt=


实例:

输入雇员的姓名,返回该雇员的年薪

create function sp_fun2(spName varchar2) return

number is yearSal number(7,2);

--执行部分

select sal*12+nvl(comm,0)*12 into yearSal from emp where ename=spName;

return yearSal;

end;

如何调用函数:

var abc number;

call sp_fun2('SCOTT') into:abc;

包:

Oracle数据库操作大全(十四)pl/sql编程之存储过程



source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template