我初学ORACLE,在SQL PLUS中输入
create table a (
name varchar(10) );
回车后提示表已创建,接着我想创建一个存储过程,输入如下:
create or replace procedure tt2(
n1 in score.score%type,
n2 out varchar2
n3 in out score.cno%type ) as
v_sc score.score%type;
begin
select score
into v_sc
from score
where score > n1 and cno=n3;
if v_sc >0 then
n2:=n3 || ' ' || to_char(n1);
n3:='ok';
else
n2:='';
n3:='not!';
end if;
end;
到最后回车后,又出来行号,没有提示出错或编译成功,怎么回事呢?
create table a (
name varchar(10) );
回车后提示表已创建,接着我想创建一个存储过程,输入如下:
create or replace procedure tt2(
n1 in score.score%type,
n2 out varchar2
n3 in out score.cno%type ) as
v_sc score.score%type;
begin
select score
into v_sc
from score
where score > n1 and cno=n3;
if v_sc >0 then
n2:=n3 || ' ' || to_char(n1);
n3:='ok';
else
n2:='';
n3:='not!';
end if;
end;
到最后回车后,又出来行号,没有提示出错或编译成功,怎么回事呢?
n1 in score.score%type,
n2 out varchar2 ------少了“,”
n3 in out score.cno%type