日期:2014-05-17 浏览次数:20890 次
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;
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;
------解决方案--------------------
LS的说得对、但是记住、如果用了双引号("")、那么Oracle将区分""里面内容的大小写了!