嗨我是新来的,也是新的oracle pl / sql块这是编译它的代码返回警告:编译但编译错误
create or replace function func_o12 return varchar2
is
declare nn varchar2(20);
begin
select
case substr(1234,1,3)
when '134' then '1234 is a match'
when '1235' then '1235 is a match'
when concat('1','23') then concat('1','23')||' is a match'
else 'no match'
end
into :nn
from dual;
return :nn;
end;
答案 0 :(得分:0)
您不需要声明或绑定标记:
create or replace function func_o12 return varchar2
is
nn varchar2(20);
begin
select
case substr(1234,1,3)
when '134' then '1234 is a match'
when '1235' then '1235 is a match'
when concat('1','23') then concat('1','23')||' is a match'
else 'no match'
end
into nn
from dual;
return nn;
end;