结构
declare
创建变量,游标已经自定义异常
begin
sql语句或pl/sql语句
exception
异常处理代码
end
if语句
/**
if 条件表达式 then
pl/sql语句
end if;
*/
set serveroutput on;
declare
a number;
b number;
begin
a:=3;
b:=4;
if a>b then
dbms_output.put_line(a||'>'||b);
end if;
dbms_output.put_line(a||'<='||b);
end;