set serveroutput on;
declare
sum integer := 0;
inc integer := 0;
begin
loop
inc := inc + 1;
if inc > 100
then
exit;
else
sum := sum + inc;
end if;
end loop;
dbms_output.put_line(sum);
end;运行时有以下错误:
第 11 行出现错误:
ORA-06550: 第 11 行, 第 15 列:
PLS-00103: 出现符号 "+"在需要下列之一时:
(
ORA-06550: 第 14 行, 第 26 列:
PLS-00103: 出现符号 ")"在需要下列之一时:
(刚接触PL/SQL请求大家的帮助。
declare
sum integer := 0;
inc integer := 0;
begin
loop
inc := inc + 1;
if inc > 100
then
exit;
else
sum := sum + inc;
end if;
end loop;
dbms_output.put_line(sum);
end;运行时有以下错误:
第 11 行出现错误:
ORA-06550: 第 11 行, 第 15 列:
PLS-00103: 出现符号 "+"在需要下列之一时:
(
ORA-06550: 第 14 行, 第 26 列:
PLS-00103: 出现符号 ")"在需要下列之一时:
(刚接触PL/SQL请求大家的帮助。
解决方案 »
- 超复杂的求和,求平均的行转列显示,请高人指点?
- 请问可以用SQL来查询到当前Session的事务状态吗?
- Oracle中的游标使用问题
- Oracle 10g怎么修改用户的身份
- ----灾难性问题,求助,高手请进!!!!!
- oracle时间问题
- red flag6下安装oracle10g,每次安装到62%时总卡在linking ntcontab这里
- PLSQL中的周号转换是不是真的这么麻烦?
- plsql里面两个集合的合集、差集、交集怎么写?
- sql*plus中我conn xh/xh;之后,怎么看xh用户中my all of create的table
- 新手学习游标时出现的错误,请求大家帮助。
- 你们能懂时间的伤么?
declare
"sum" integer := 0;
inc integer := 0;
begin
loop
inc := inc + 1;
if inc > 100
then
exit;
else
"sum" := "sum" + inc;
end if;
end loop;
dbms_output.put_line("sum");
end;sum 应该是关键字, 一般不用关键字声明变量,你非要用的话加上引号