http://publib.boulder.ibm.com/infocenter/iseries/v5r4/index.jsp

  If you intend to update a column or delete a row, you cannot include a GROUP BY or HAVING clause in the SELECT statement within a DECLARE CURSOR statement. These clauses make it a read-only cursor.

  Null values are ordered as the highest value.

  A null value is not the same as zero or all blanks. A null value means unknown. Null values can be used as a condition in the WHERE and HAVING clauses.

  Comparing two columns using a normal equal comparison (COL1 = COL2) will be true if both columns contain an equal non-null value. If both columns are null, the result will be false since null is never equal to any other value, not even another null value. Using the DISTINCT predicate, null values are considered equal. So (COL1 is NOT DISTINCT from COL2) will be true if both columns contain an equal non-null value and also when both columns are the null value.

  Null values are treated as duplicate rows for DISTINCT.

  Online analytical processing (OLAP) specifications are used to return ranking numbers and row numbers for the result rows of a query. You can specify RANK, DENSE_RANK, and ROW_NUMBER.

  The USING clause is equivalent to a join condition where each column from the left table is compared to a column with the same name in the right table.

  ? the use of recursive common table expressions and recursive views.

  If you want to keep duplicates in the result of a UNION, specify UNION ALL instead of just UNION.

  Data retrieval errors/SQLCODE

  You can use a select-statement within an INSERT statement to insert zero, one, or more rows into a table from the result table of the select-statement.

学习笔记之SQL Programming DB2的更多相关文章

  1. Oracle学习笔记三 SQL命令

    SQL简介 SQL 支持下列类别的命令: 1.数据定义语言(DDL) 2.数据操纵语言(DML) 3.事务控制语言(TCL) 4.数据控制语言(DCL)  

  2. SQL反模式学习笔记21 SQL注入

    目标:编写SQL动态查询,防止SQL注入 通常所说的“SQL动态查询”是指将程序中的变量和基本SQL语句拼接成一个完整的查询语句. 反模式:将未经验证的输入作为代码执行 当向SQL查询的字符串中插入别 ...

  3. CUBRID学习笔记 41 sql语法之select

    cubrid的中sql查询语法 SELECT [ ] [{TO | INTO} ][FROM ] [WHERE ][GROUP BY {col_name | expr} [ASC | DESC], . ...

  4. 【初学Java学习笔记】SQL语句调优

    1, 对查询进行优化,应尽量避免全表扫描,首先应考虑在 where 及 order by 涉及的列上建立索引. 2,应尽量避免在 where 子句中对字段进行 null 值判断,创建表时NULL是默认 ...

  5. SQL学习笔记之SQL查询练习题1

    (网络搜集) 0x00 表名和字段 –1.学生表 Student(s_id,s_name,s_birth,s_sex) –学生编号,学生姓名, 出生年月,学生性别 –2.课程表 Course(c_id ...

  6. 学习笔记之SQL 教程

    SQL 教程 | 菜鸟教程 http://www.runoob.com/sql/sql-tutorial.html SQL,指结构化查询语言,全称是 Structured Query Language ...

  7. Oracle学习笔记六 SQL常用函数

    函数的分类 Oracle 提供一系列用于执行特定操作的函数 SQL 函数带有一个或多个参数并返回一个值 以下是SQL函数的分类:

  8. Oracle学习笔记四 SQL命令(二):SQL操作语言类别

    SQL分为下列语言类别 1.数据定义语言(DDL) Create.Alter.Drop 2.数据操纵语言(DML) Insert.Select.Delete.Update 3.事务控制语言(TCL) ...

  9. R语言学习笔记:SQL操作

    虽然R很强大,但如果对SQL非常熟悉,也不能浪费这项技能了,可以用上sqldf包,从example("sqldf")抄了几条用法放在这里,以后可能会用上. library(&quo ...

随机推荐

  1. VC++6.0环境下调试c语言代码的方法和步骤_附图

    1.C语言程序四步开发步骤 (1)编辑.可以用任何一种编辑软件将在纸上编写好的C语言程序输入计算机,并将C语言源程序文件*.c以纯文本文件形式保存在计算机的磁盘上(不能设置字体.字号等). (2)编译 ...

  2. Windows安装weblogic

    WebLogic安装结束 以下是进入MyEclipse启动配置WebLogic

  3. ASP.NET工作笔记之一:图片上传预览及无刷新上传

    转自:http://www.cnblogs.com/sibiyellow/archive/2012/04/27/jqueryformjs.html 最近项目里面涉及到无刷新上传图片的功能,其实也就是上 ...

  4. static用法详解

    一. 面向过程程序设计 1.静态全局变量 在全局变量前,加上关键字static,该变量就被定义成为一个静态全局变量.我们先举一个静态全局变量的例子,如下: //Example 1 #include & ...

  5. MSP430的看门狗常见用法以及中断函数的书写方法

    今天下午看了一下MSP430的看门狗的基本用法 看门狗是为了防止程序跑飞而设定的,但是由于看门狗是一个类似于定时器,因此可以把他当作定时器来使用 示例代码:用看门狗定时器使一个led闪烁 #inclu ...

  6. 设计模式_Composite_合成模式

    形象例子: Mary今天过生日.“我过生日,你要送我一件礼物.”“嗯,好吧,去 商店,你自己挑.”“这件T恤挺漂亮,买,这条裙子好看,买,这个包也不错,买.”“喂,买了三件了呀,我只答应送一件礼物的哦 ...

  7. Channel 详解

    java.nio.channels.FileChannel封装了一个文件通道和一个FileChannel对象,这个FileChannel对象提供了读写文件的连接. 1.接口 2.通道操作 a.所有通道 ...

  8. 【译】 AWK教程指南 2概述

    2.1 为什么用AWK 由于awk具有上述特色,在问题处理的过程中,可轻易使用awk来撰写一些小工具:这些小工具并非用来解决整个大问题,它们只扮演解决个别问题过程的某些角色,可通过Shell所提供的p ...

  9. 在PHPmyadmin中删除数据库

    删除数据库用sql语句 的方法:   删除数据库DROP DATABASE `数据库名称`; 删除数据库里的表DROP TABLE `数据库里的表名`;

  10. 部分常用Express方法详解

    app.set(name, value) 分配给name一个value,并将name作为app settings table的一个属性. 使用app.set('foo', true) 相当于调用 ap ...