开发者

Using PL/SQL associative arrays

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 t开发者_运维知识库wo arrays
-- How can i do that with out using the loops.
-- is there any bulk insert or update.

end

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?


If you have PL/SQL associative arrays, you can use bulk processing to insert the data into underlying database tables using FORALL.

The oracle documantation is here: http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14261/forall_statement.htm

The syntax is similar to:

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

It's a bit of a generic answer but you have asked a very generic question.

Hope this helps...

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜