您的位置:首页 > 数据库 > Oracle

oracle bulk collect for in

2013-12-10 21:12 274 查看
declare

 --定义表类型

  type g_table is table of GPRS270_201311%rowtype index by pls_integer;

 --声明数组

  g_datas g_table;

begin
  --批量查询

  select * bulk collect into g_datas from GPRS270_201311;
--数组大小

  dbms_output.put_line(g_datas.count);

--循环输出

  for i in 1 .. g_datas.count loop

    dbms_output.put_line(g_datas(i).telnum);

  end loop;

end;
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: