存储过程掉用的问题

haifei123 2007-04-08 05:48:13
create or replace procedure last_pro
is
age student_004.m_age%type;

begin

select max(m_age) into age from student_004 ;
if age > 30 then

age := age+1;

end if;
end last_pro;
----------------调用存储过程
declare
null;
begin

last_pro;

end if;
end;
声明的无参数的存储过程

该怎么调用

我写的总该变不了表里的值
...全文
175 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
waterblue1981 2007-04-11
  • 打赏
  • 举报
回复
你只是修改了变量的值,还没有修改表里的值,age student_004.m_age%type; 这只是定义一个和该字段同等类型的变量,你还是要修改表里的字段才行呀

hdevil 2007-04-09
  • 打赏
  • 举报
回复
... 你没update表里面的数据 当然不会改变了
haifei123 2007-04-08
  • 打赏
  • 举报
回复
调用的时候
end if;
应该去掉
不好意思

17,377

社区成员

发帖
与我相关
我的任务
社区描述
Oracle 基础和管理
社区管理员
  • 基础和管理社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧