create table t1(id number primary key,name varchar2(100));
insert into t1 values(1,'aaa');
insert into t1 values(2,''bbb');
commit;
create
or
replace
function
fun1(p_id
number
)
return
varchar2
is
Result
varchar2
(
100
);
begin
select
name
||
'aa'
into
Result
from
t1
where
id=p_id;
return
(
Result
);
end
fun1;
update
t1
set
name
=(fun1(
2
))
where
1
=
1
;