定义变量

qq_37347322 2017-03-15 10:21:17
oracle存储过程怎样定义变量
create or replace procedure practice(dept_id number,v_salary out number)
is
message varchar;
cursor salary_cursor is select salary from employees where department_id=dept_id;
begin
v_salary :=0;
message :="uuuuu";
for c in salary_cursor loop
v_salary := v_salary+c.salary;
end loop;
dbms_output.put_line(v_salary||message);
end;
...全文
355 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
卖水果的net 2017-03-15
  • 打赏
  • 举报
回复
message varchar2(2000); -- 这里要写上长度; PS: 参数不写,但变量一定要写上长度;

3,497

社区成员

发帖
与我相关
我的任务
社区描述
Oracle 高级技术相关讨论专区
社区管理员
  • 高级技术社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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