2009年2月25日
摘要: 1、固定列数的行列转换 如 student subject grade --------- ---------- -------- student1 语文 80 student1 数学 70 student1 英语 60 student2 语文 90 student2 数学 80 student2 英语 100 …… 转换为 语文 数学 英语 student1 80 70 60 student2 ... 阅读全文
posted @ 2009-02-25 16:59 Oracle 阅读(29192) 评论(1) 推荐(2) 编辑
摘要: 最近把oracle嵌套表的其他功能仔细看了看并做了个简单整理。 oracle提供两种使用嵌套表的方法: 1. PL/SQL代码中作为扩展PL/SQL语言;(这部分内容就是上边所说oracle内存表是oracle嵌套表的部分功能) 2. 作为物理存储机制,以持久地存储集合。 */ --创建测试表: CREATE TABLE dept (deptno NUMBER(2) PRIMARY... 阅读全文
posted @ 2009-02-25 13:43 Oracle 阅读(743) 评论(0) 推荐(0) 编辑
摘要: CREATE type addrs_type IS TABLE OF varchar2(128); create table employye ( eoid number(4),mailaddr addrs_type) nested table mailaddr store as addr_table ; insert into employye values(123,addrs_typ... 阅读全文
posted @ 2009-02-25 12:24 Oracle 阅读(341) 评论(0) 推荐(0) 编辑
摘要: 一、Types of Collections 1、Associative arrays 数组 它是同种类型的一维、无边界的稀疏集合,只能用于 PL/SQL。 DECLARE TYPE t_name IS TABLE OF varchar2(10) INDEX BY PLS_INTEGER; --创建 Collection i_name ... 阅读全文
posted @ 2009-02-25 11:35 Oracle 阅读(3937) 评论(0) 推荐(0) 编辑