create or replace procedure proc_stu(sid number,age in out number)
is
begin
update student set stuAge=stuAge+age where stuId=sid;
select avg(stuAge) into age from student;
end proc_stu;
---
declare
id number:=&id;
age1 number:=&age1;--5
begin
proc_stu(id,age1);
dbms_output.put_line('平均年龄:'||age1);
end;
里面的in out不是很明白?
is
begin
update student set stuAge=stuAge+age where stuId=sid;
select avg(stuAge) into age from student;
end proc_stu;
---
declare
id number:=&id;
age1 number:=&age1;--5
begin
proc_stu(id,age1);
dbms_output.put_line('平均年龄:'||age1);
end;
里面的in out不是很明白?
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货