oracle Functioin

清华大佬耗费三个月吐血整理的几百G的资源,免费分享!....>>>

create or replace function get_user
return  varchar2 
is
Result_user varchar2(50);
begin 
select  username into Result_user from user_users;
return Result_user;
end get_user;
drop function get_user

调用:
SQL> var Re varchar2(50)
SQL> ;
SQL> exec :re:=get_user;
 
PL/SQL procedure successfully completed
Re
---------
YPGJ