首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > 其他数据库 >

数组集合部类 index table

2012-11-25 
数组集合类型 index table-- Created on 2010/05/18 by NANdeclare-- Local variables herei integerTYPE

数组集合类型 index table

-- Created on 2010/05/18 by NANdeclare  -- Local variables here  i integer;  TYPE t_table IS TABLE OF VARCHAR2(20 ) INDEX BY VARCHAR2 (20);  v_table t_table;  v_str VARCHAR2( 20);BEGIN  v_table('a') := 'aa';  v_table('b') := 'bb';  v_str := v_table.first;  WHILE v_str IS NOT NULL LOOP      dbms_output.put_line(v_table(v_str));      v_str := v_table.next(v_str);  END LOOP;     EXCEPTION      WHEN OTHERS THEN           dbms_output.put_line( sqlerrm);end;

热点排行