oracle中存储过程和函数有什么区别,Oracle中存储过程和函数的区别
Oracle中存儲(chǔ)過程和函數(shù)的區(qū)別
存儲(chǔ)過程和函數(shù): ?www.2cto.com
例子:
[sql]
//創(chuàng)建過程
create or replace procedure add_emailinfo(namee email_info.fullname%type ,address email_info.email_address%type )
is
begin
insert into email_info(fullname,email_address) values (namee,address);
end;
//調(diào)用過程
call add_emailinfo('cherry','asdfsdf');
www.2cto.com ?/
//創(chuàng)建函數(shù)
create or replace function ?sel_emailinfo(namee email_info.fullname%type )
return varchar2 is
address varchar2(30);
begin
select email_address into address from email_info
where trim(fullname)=trim(namee);
return address;
end ;
//調(diào)用函數(shù)
select sel_emailinfo('bbb') from dual;
總結(jié)
以上是生活随笔為你收集整理的oracle中存储过程和函数有什么区别,Oracle中存储过程和函数的区别的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: python更新excel内容_使用py
- 下一篇: python虚拟人脸生成_GitHub