【oracle】存储过程05条件分支

参考链接  基于oracle数据库的PLSQL编程以及存储过程的创建和使用视频_哔哩哔哩_bilibili
====================================================================================

-- Created on 2021/3/15 by 柴英兵 

declare 

  -- Local variables here

  v_count  number;
 

begin

  -- Test statements here

  select count(1)  into v_count  from  student0;

  DBMS_output.put_line('总数:'||v_count  );
 

  if v_count>20 then

      DBMS_output.put_line('student0表总数超过了:'||v_count  );

    ELSIF v_count>= 10 then 

      DBMS_output.put_line('student0表总数在10-20条:'||v_count);   

    ELSE 

     DBMS_output.put_line('student0表总数在10条一下的有:'||v_count  );  

    END IF;  

end;

=========================================================================

猜你喜欢

转载自blog.csdn.net/weixin_40074861/article/details/121830940
今日推荐