在Oracle PL/SQL中声明动态数组 [英] Declare dynamic array in Oracle PL/SQL
本文介绍了在Oracle PL/SQL中声明动态数组的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否有一种简单的方法可以在Oracle PL/SQL中声明动态数组?
Is there an easy way to declare a dynamic array in Oracle PL/SQL?
我需要使用可以包含100,000个数字的数组,而其他时候我只需要存储3个数字
I need to use an array that can contain 100,000 numbers and other times I need to store only 3 numbers
推荐答案
PL/SQL中有三种收集类型.仅varrays
具有固定的最大元素数.如果您使用嵌套表格或<而是使用href ="http://docs.oracle.com/cd/E11882_01/appdev.112/e25519/composites.htm#CHDEIDIC" rel ="noreferrer">关联数组,您可以添加尽可能多的元素如您所愿.
There are three types of collection in PL/SQL. Only the varrays
have a fixed maximum number of elements. If you use a nested table or an associative array instead, you can add as many element as you want.
进一步阅读: PL/SQL收集和记录
这篇关于在Oracle PL/SQL中声明动态数组的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文