码迷,mamicode.com
首页 > 数据库 > 详细

PL/SQL个人学习笔记(二)

时间:2014-09-02 10:35:24      阅读:200      评论:0      收藏:0      [点我收藏+]

标签:plsql

IF条件

declare 

  cursor s is 
          select version from city_server t;
  s_ city_server.version%type;
begin
  open s;
  fetch s into s_;
        if s_>2 
          then
        DBMS_OUTPUT.put_line(s_);
        end if;
  close s;

end;


LOOP循环
declare 
  cursor s is 
          select version from city_server t;
  s_ city_server.version%type;
begin
  open s;
  loop
      fetch s into s_;
        exit when s%notfound;
        DBMS_OUTPUT.put_line(s_);
  end loop;
  close s;
end;


PL/SQL个人学习笔记(二)

标签:plsql

原文地址:http://blog.csdn.net/ztt_1119/article/details/39001207

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!