oracle控制语句学习一——if elsif else控制语句

declare
v_count number(6,2);
begin
select count(1) into v_count from communitytype t
where t.community_type_id = 'AcademicRes';
if v_count > 1
then
dbms_output.put_line('查询到多条');
elsif v_count > 0
then
dbms_output.put_line('查询一条');
else
dbms_output.put_line('失败');
end if;
end;

你可能感兴趣的:(java,oracle)