Oracle function to return temporary table

Discussion in 'Databases' started by Jamie18, Mar 15, 2010.

  1. #1
    hi..

    i need to make a function that returns a table that is populated within the function...

    i can't create any object types:mad:.. so i can't have a predefined table with the fields i want returned

    is there a way to create a temporary table type in a function, populate it and return it? where the temporary table type expires after the return?

    this is basically the structure of the function i need
    create function f(x,y,z) returns (table to be defined)
    as
    ...
    begin
       build temporary table
       return temp table
    end;
    Code (markup):
    any ideas would be appreciated
     
    Jamie18, Mar 15, 2010 IP