Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Functions returning tables
"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