Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: pl/sql function
personally, I never liked the idea of having an IN
OUT parameter
In my book it's poor not to say bad programming
practice. Ie.
never tamper with the data you receive. It's,
still in my book, either IN or OUT. You can check
if
the data has changed, yes, but why ?
And modifying an item in a record-pl/sql table
(unless I have misunderstood something here)
should be needless to say.
Regards,
Keld
"Rauf Sarwar" <rs_arwar_at_hotmail.com> wrote in
message
news:92eeeff0.0207221443.4d597c99_at_posting.google.c
om...
> "Sybrand Bakker" <postbus_at_sybrandb.demon.nl>
wrote in message
news:<ujnb1jl1k4ap4a_at_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.
> >
> > > Care to elaborate on this. Are you saying thatusing OUT parameters in
> a function is a "bad programming practice"? > > Besides not being able to use in a selectstatement...I am curious as
![]() |
![]() |