有关Declare语句
下面这条语句在我的SQL PLUS 中不能正确执行,请教问题出在哪里。
数据类型转换:
declare
xh varchar2(6);
begin
select xh from xs
where xam(xh)> 1;
end;
我的执行结果是:
SQL> declare
2 xh varchar2(6);
3 begin
4 select xh from xs
5 where xam(xh)> 1;
6 end;
7 --连敲3次回车
8
9
------解决方案--------------------declare
xh varchar2(6);
begin
select xs.xh into xh from xs
where rownum <2;
end;
------解决方案--------------------SQL> declare
2 v_xh varchar2(6);
3 begin
4 select xh into v_xh from xs where xam(xh)> 1;
5 end;
6 /
------解决方案-------------------- '/ '
执行上句sql;