declare
aa integer;
begin
aa:=ⅆ
if aa<4 then
elsif aa<2 then
dbms_output.put_line('2>x');
else
dbms_output.put_line('4>x>2');
end if;
else
dbms_output.put_line('x>=4');
end if;
end;
/
总是显示:
ORA-06550: 第 7 行, 第 8 列:
PLS-00103: 出现符号 "AA"在需要下列之一时:
:= . ( @ % ;
是哪出错了啊
aa integer;
begin
aa:=ⅆ
if aa<4 then
elsif aa<2 then
dbms_output.put_line('2>x');
else
dbms_output.put_line('4>x>2');
end if;
else
dbms_output.put_line('x>=4');
end if;
end;
/
总是显示:
ORA-06550: 第 7 行, 第 8 列:
PLS-00103: 出现符号 "AA"在需要下列之一时:
:= . ( @ % ;
是哪出错了啊
aa integer;
begin
aa:=ⅆ
if aa <4 then
null;--这里不能空
elsif aa <2 then
dbms_output.put_line('2>x');
else
dbms_output.put_line('4>x>2');
end if;
else
dbms_output.put_line('x>=4');
end if;
end;
看看还有问题吗
你有一个if怎么会有两个end if
aa integer;
begin
aa:=ⅆ
if aa <4 then
null;
else
if aa <2 then
dbms_output.put_line('2>x');
else
dbms_output.put_line('4>x>2');
end if;
else
dbms_output.put_line('x>=4');
end if;
end;
那应该是这样或者
if ... then
elsif ... then
elsif ... then
else ... then
end if
最后的else 就没有...then 了
aa integer;
begin
aa:=ⅆ
if aa <4 then
if aa <2 then
dbms_output.put_line('2>x');
else
dbms_output.put_line('4>x>2');
end if;
else
dbms_output.put_line('x>=4');
end if;
end;
/