2
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

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?

1 Answer 1

7

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...

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.