编写pl/sql时,报错

/*
写一个简单的PL/SQL
*/

declare 
  a int:=300;
  b int:=200;
  c number;
begin 
  c:=(a+b)/(a-b);
  dbms_output.put_line(c);
exception 
  when zero_divide then
  dbms_output.put_line('除数不许为零');
end;
View Code

这里需要注意:字符串用单引号,不是双引号

posted @ 2017-06-14 16:25  酸奶加绿茶  阅读(236)  评论(0编辑  收藏  举报