Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/oracle/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Oracle 使用PL/SQL关联数组_Oracle_Plsql_Bulkinsert - Fatal编程技术网

Oracle 使用PL/SQL关联数组

Oracle 使用PL/SQL关联数组,oracle,plsql,bulkinsert,Oracle,Plsql,Bulkinsert,现在我有两个数组。我想使用这两个数组插入或更新到表中。我如何在不使用循环的情况下做到这一点?是否有任何大容量插入或更新?如果您有PL/SQL关联数组,则可以使用FORALL使用大容量处理将数据插入基础数据库表 oracle文档位于此处: 语法类似于: create or replace aArr is TABLE of varchar2 index by binary_integer; create or replace bArr is TABLE of varchar2 index by b

现在我有两个数组。我想使用这两个数组插入或更新到表中。我如何在不使用循环的情况下做到这一点?是否有任何大容量插入或更新?

如果您有PL/SQL关联数组,则可以使用FORALL使用大容量处理将数据插入基础数据库表

oracle文档位于此处:

语法类似于:

create or replace aArr is TABLE of varchar2 index by binary_integer;
create or replace bArr is TABLE of varchar2 index by binary_integer;

create or replace prc(oname aArr, iname bArr) as
begin

--Now i have two arrays
-- i want to insert or update into table using these two arrays
-- How can i do that with out using the loops.
-- is there any bulk insert or update.

end
索引中的所有x的

--DML(插入或更新等)
这是一个有点笼统的回答,但你问了一个非常笼统的问题

希望这有助于

FORALL x IN INDICES OF <associative_array_name>
   -- DML (INSERT or UPDATE etc)