Chinaunix首页 | 论坛 | 博客
  • 博客访问: 650391
  • 博文数量: 789
  • 博客积分: 5000
  • 博客等级: 大校
  • 技术积分: 4985
  • 用 户 组: 普通用户
  • 注册时间: 2008-10-28 09:29
文章分类

全部博文(789)

文章存档

2011年(1)

2008年(788)

我的朋友

分类:

2008-10-28 09:44:51


  index by表:
  定义方式:type tabletype is table of type index by binary_interget
  特点:关键字可以是binary_interget的任意值,不需要初始化
  例子:
  TYPE StudentTab IS TABLE OF students%ROWTYPE INDEX BY BINARY_INTEGER;
  v_Students(1).first_name := 'Larry';
  
  嵌套表:
  定义方式:type tabletype is table of type [not null]
  特点:关键字不能是负值,必须用有序的关键字创建,可以在表中,使用前必须先初始化
  例子:
  TYPE NumbersTab IS TABLE OF NUMBER;
  -- Create a table with one element.
  v_Tab1 NumbersTab := NumbersTab(-1);
  备注:
  v_Tab1 NumbersTab ;
  v_Tab1 := NumbersTab(-1);
  等同于
  v_Tab1 NumbersTab := NumbersTab(-1);
  
  可变数组:
  定义方式:type type_name is {varray | varying varray} (max_size) of element_type[not null]
  特点:跟嵌套表相似,不过他有最大值限制
  例子:
  TYPE Strings IS VARRAY(5) OF VARCHAR2(10);
  v_List Strings := Strings('One', 'Two', 'Three');
【责编:admin】

--------------------next---------------------

阅读(258) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~