Requires Free Membership to View
Public staticIn order to create a function with a varray datatype parameter, you should create a varray datatype. I have created two varrays, 1)return_array; 2)named_array.arraytest( ) { }
CREATE TYPE return_array AS VARRAY(10) of VARCHAR2(10); CREATE TYPE named_array AS VARRAY(10) of VARCHAR2(10);After creating your arrays, you can now create your stored function arrayTest.
CREATE or REPLACE FUNCTION arrayTest(array1 named_array)
RETURN return_array
as
begin
-- some data manipilation
null;
exception
when others then
null;
end;
For more info on VARRAY see Chapter 6 in "Oracle Database 10g PL/SQL Programming" by Oracle Press.This was first published in July 2006

Join the conversationComment
Share
Comments
Results
Contribute to the conversation