`
1988xuxuxu
  • 浏览: 20226 次
  • 性别: Icon_minigender_1
  • 来自: 大连
文章分类
社区版块
存档分类
最新评论

ORACLE数组

阅读更多
DECLARE
  TYPE t_list IS TABLE OF VARCHAR2(20);
  v_deptno_arr t_list := t_list('EP400', 'EP000', 'EP400', 'EP401', 'EP402');
BEGIN
  v_deptno_arr := SET(v_deptno_arr);
  FOR i IN 1 .. v_deptno_arr.count LOOP
    dbms_output.put_line(v_deptno_arr(i));
  end loop;
END;
/

SET 去重功能。


数组的定义方式 :
1、v_deptno_arr t_list := t_list('EP400', 'EP000', 'EP400', 'EP401', 'EP402');

2、v_deptno_arr t_list;
v_deptno_arr(1):='EP400';
...
...
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics