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

Home -> Community -> Usenet -> c.d.o.misc -> Re: pl/sql function

Re: pl/sql function

From: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: Mon, 22 Jul 2002 08:52:03 +0200
Message-ID: <ujnb1jl1k4ap4a@corp.supernews.com>

"Tim Cross" <tcross_at_nospam.une.edu.au> wrote in message news:8765z88tn4.fsf_at_blind-bat.une.edu.au...
> "Peter" <depend3_at_yahoo.com> writes:
>
> > Is it possible to return two values when you write a function without
> > concat? If yes, how do you do this?
> > Thanks.
> >
> >
> As far as I know, you can only return one "thing" - however that
> "thing" could be a record which contains multiple other "things" - so
> if you need to return two (or more) distinct values, define a record
> which represents the values to be returned, put those values in the
> record and return that.
>
> Alternatively, make one of the values you want to return an IN OUT
> parameter to the function call and put one value in that parameter and
> return the other.
>
> Tim
> --
>

The latter of which is definitely programming with side-effects, and as this usually results in hard-to-debug programs, should be considered bad programming practice. If you want to make a gordian knot of your programs,. fine with me, but please don't recommend this to others.

Regards

--
Sybrand Bakker
Senior Oracle DBA

to reply remove '-verwijderdit' from my e-mail address
Received on Mon Jul 22 2002 - 01:52:03 CDT

Original text of this message

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