declare
v_count number(10);
begin
select count(*) into v_count from staff;
if v_count > 10 then
dbms_output.put_line('大于10');
elsif v_count < 10 then
dbms_output.put_line('小于10');
end if;
end;
v_count number(10);
begin
select count(*) into v_count from staff;
if v_count > 10 then
dbms_output.put_line('大于10');
elsif v_count < 10 then
dbms_output.put_line('小于10');
end if;
end;
...
elsif ... then
...
else
...
end if;or
if ... then
...
else
...
end if;or
if ... then
...
end if;
...
ELSE IF...THENEND IF