日期:2014-05-17 浏览次数:21469 次
create or replace function fun_test(iBook_name in varchar2)
return int
is
vCount int;
begin
select count(1)
into vCount
from course
where cou_name = iBook_name;
if ( vCount = 1 ) then
return 1;
else
return 0;
end if;
end;
create or replace function f_list_ename
return varchar2 is
v_result varchar2(32767) := '';
cursor v_cur is select ENAME from scott.emp;
v_ename varchar2(50);
begin
open v_cur;
loop
fetch v_cur into v_ename;
exit when v_cur%notfound;
v_result := v_result
------解决方案--------------------
v_ename
------解决方案--------------------
'--';
end loop;
return(rtrim(v_result,'--'));
end f_list_ename;