编写pl/sql时,报错

编写pl/sql时,报错编写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

编写pl/sql时,报错

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

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

相关文章: