1. 创建stu表,如下:

  create table stu(s1 number, s2 number);

2. 定义多维数组, 能用来接受多条返回数据

  方式一:   type type_name is table of stu%rowtype;           # 基于表中行类型的多维数组

      custom_type type_name;                                    # 定义该多维数组变量

      execute immediate 'select * from stu where s1>:1' bulk collect into custom_type using in 5;

  方式二:   type list_name is record(x number, y number);   # 先定义record, record即一维数组,

      type type_name is table of list_name;                  # 使用定义的一维数组定义多维数组

      custom_type type_name;               # 定义该多维数组变量

      execute immediate 'select * from stu where s1>:1' bulk collect into custom_type using in 5;

3. 定义一维数组, 用来接受一条返回数据

  方式一:   type list_name is record(x number, y number);    # 先定义record, record即一维数组.

      custom_type list_name                  #定义该一维数组变量.

      execute immediate 'select * from stu where s1=:xx' into custom_type using in 1;

  方式二:   custom_type stu%rowtype;                           # 使用表的行类型定义一维数组变量

      execute immediate 'select * from stu where s1=:xx' into custom_type using in 1;

最新文章

  1. python关于分割与拼接的那些事
  2. ArcGisEngineForJava开发
  3. VS2013 密钥 – 所有版本(Visual Studio Ultimate,Premium,Professional,TFS)
  4. Lucene.net站内搜索—2、Lucene.Net简介和分词
  5. Hadoop 之MongoDB
  6. 用JQuery给图片添加鼠标移入移出事件
  7. 使用UDEV绑定ASM多路径磁盘
  8. 在Win7下要通过某个 线程 来调用SavaDialog文件选择框的问题
  9. HW3.8
  10. 【Unity探究】物理碰撞实验
  11. SQL Server :理解DCM页
  12. poj 1328 Radar Installation (简单的贪心)
  13. Mirantis OpenStack 8.0 版本
  14. ASP.NET没有魔法——目录(完结)
  15. 主机名变成bogon?连不上mysql?你需要看下这篇文章
  16. 初识shell编程
  17. macbook突然没有声音了
  18. MySQL5.7 搭建主从同步
  19. sap 软件架构
  20. SSO单点登录_理解

热门文章

  1. Violet音乐社区 - 个人总结报告
  2. java根据value获取Map对象的key
  3. centos安装Redis和设置远程访问
  4. 使用SQL Server内存优化表 In-Memory OLTP
  5. 表单生成器(Form Builder)之mongodb表单数据查询——关联查询
  6. mysql windows 安装5.7
  7. java1.8 ConcurrentHashMap 详细理解
  8. Bit Manipulation-leetcode
  9. RocketMQ 升级到主从切换(DLedger、多副本)实战
  10. Linux配置部署_新手向(三)——MySql安装与配置