表结构:
test(id number,value varchar2(10))存储过程:
create or replace procedure test_pro1(b out number,a in varchar2) is
begin
select id into b from test where value=a;
end test_pro1;建立正确
但执行时报错,错误如下:
ORA-01008:并非所有变量都已绑定请帮忙解决下!谢谢先!
test(id number,value varchar2(10))存储过程:
create or replace procedure test_pro1(b out number,a in varchar2) is
begin
select id into b from test where value=a;
end test_pro1;建立正确
但执行时报错,错误如下:
ORA-01008:并非所有变量都已绑定请帮忙解决下!谢谢先!
没有发现错误
执行如下:
sql> var b number;
sql>exec test_pro1(:b,'111');
begin
select id into b from test where value=a;
end test_pro1;
------------------------------
你给出的procedure定义中不存在你说的错误
应该是你定义时的sql包含“:”
去掉即可。
答案正确,请问为什么非得先执行下var b number呢?
谢谢!