Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Functions returning tables

Re: Functions returning tables

From: Michel Cadot <micadot{at}altern{dot}org>
Date: Sat, 26 Feb 2005 16:32:47 +0100
Message-ID: <42209666$0$19667$626a14ce@news.free.fr>

"Paulos" <paulos_at_skynet.be-nospam> a écrit dans le message de news:42208e3c$0$29845$ba620e4c_at_news.skynet.be...
| A colleague at work suggested that it is possible to create a function
| in Oracle 9i that can be used in a select statement to return all or
| part of a table...
|
| some thing like
|
| Create function GetTable
|
| as
|
| return select * from foo;
|
| end;
|
| The idea being to then se the function in a select something along the
| lines of
|
| Select * from GetTable
|
| I am not familiar with this functionality in Oracle 9i and I can't find
| anything that makes sense to me in the help files or out on the net
|
| Does anyone know if this sort of thing is possible and if so what the
| correct syntax is in the function and in the select that calls it?
|
| TIA
|
| Paulos

You'll get a full explanation in "PL/SQL User's Guide and Reference", Chapter 8 "PL/SQL Subprograms",
section "Accepting and Returning Multiple Rows with Table Functions": http://download-west.oracle.com/docs/cd/B10501_01/appdev.920/a96624/08_subs.htm#19677

Regards
Michel Cadot Received on Sat Feb 26 2005 - 09:32:47 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US