PL/SQL个人学习笔记(二)
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个人学习笔记(二)的更多相关文章
- postgreSQL PL/SQL编程学习笔记(二)
Control Structures of PL/SQL Control structures are probably the most useful (and important) part of ...
- postgreSQL PL/SQL编程学习笔记(六)——杂七杂八
1 PL/pgSQL Under the Hood This part discusses some implementation details that are frequently import ...
- postgreSQL PL/SQL编程学习笔记(三)——游标(Cursors)
Cursors Rather than executing a whole query at once, it is possible to set up a cursor that encapsul ...
- postgreSQL PL/SQL编程学习笔记(一)
1.Structure of PL/pgSQL The structure of PL/pgSQL is like below: [ <<label>> ] [ DECLARE ...
- postgreSQL PL/SQL编程学习笔记(五)——触发器(Triggers)
Trigger Procedures PL/pgSQL can be used to define trigger procedures on data changes or database eve ...
- postgreSQL PL/SQL编程学习笔记(四)
Errors and Messages 1. Reporting Errors and Messages Use the RAISE statement to report messages and ...
- PL/SQL个人学习笔记
资料1 -- Created on 2014/8/20 declare -- Local variables here i integer; begin i := 12; -- T ...
- 《SQL必知必会》学习笔记二)
<SQL必知必会>学习笔记(二) 咱们接着上一篇的内容继续.这一篇主要回顾子查询,联合查询,复制表这三类内容. 上一部分基本上都是简单的Select查询,即从单个数据库表中检索数据的单条语 ...
- Django学习笔记二
Django学习笔记二 模型类,字段,选项,查询,关联,聚合函数,管理器, 一 字段属性和选项 1.1 模型类属性命名限制 1)不能是python的保留关键字. 2)不允许使用连续的下划线,这是由dj ...
随机推荐
- 有JSON中字段最好是【字符】而非【enum】想到
最近听了牛人一句: 1,如果协议中定义了tag的话,协议的解析就不会依赖到变化,那么开发的话也更为独立. eg: good: name=“zl”, gender=“f” bad: name=" ...
- HDU 5095 Linearization of the kernel functions in SVM(模拟)
主题链接:http://acm.hdu.edu.cn/showproblem.php? pid=5095 Problem Description SVM(Support Vector Machine) ...
- HDU - 5186 - zhx's submissions (精密塔尔苏斯)
zhx's submissions Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others ...
- Struts2 + uploadify 多文件上传完整的例子!
首先,我这里使用的是 Jquery Uploadify3.2版本号 导入相关的CSS JS <link rel="stylesheet" type=" ...
- WPF学习(8)数据绑定
说到数据绑定,其实这并不是一个新的玩意儿.了解asp.net的朋友都知道,在asp.net中已经用到了这个概念,例如Repeater等的数据绑定.那么,在WPF中的数据绑定相比较传统的asp.net中 ...
- HDU 1711 Number Sequence(kmp)
Problem Description Given two sequences of numbers : a[1], a[2], ...... , a[N], and b[1], b[2], .... ...
- 亚马逊记AWS(Amazon Web Services)自由EC2应用
很长时间,我听到AWS能够应用,但是需要结合信用卡,最近申请了. 说是免费的,我还是扣6.28,后来我上网查了.认为是通过进行验证.像服务期满将返回. 关键是不要让我进入全抵扣信用卡支付passwor ...
- php异或加密解密算法的实现
function xor_enc($str,$key) { $crytxt = ''; $keylen = strlen($key); for($i=0;$i<strlen($str);$i++ ...
- 《UNIX级别编程环境》注意读出信号(2)
1.功能sigaction sigaction动与指定信号相关联的处理动作.其函数原型例如以下: #inlcude <signal.h> int sigaction(int signo,c ...
- android使用ffmpeg
cygwin上文编译文章. 在ffmpeg/arm添加的文件夹Android.mk 的主要目的是为了宣布动态库libs下一个 LOCAL_PATH:= $(call my-dir) include $ ...