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

Home -> Community -> Usenet -> c.d.o.tools -> Re: SELECT from DUAL??

Re: SELECT from DUAL??

From: Joseph Ranseth <webmaster_at_NOSPAM.worldcupfishing.com>
Date: Wed, 17 Jan 2001 19:09:10 -0600
Message-ID: <5qr96.811$wb7.16493@news1.mts.net>

Glad to see that we all agree. ;)
Thanks a bunch.

<><

"Mark Wagoner" <mwagoner_at_iac.net> wrote in message news:945d1e$h8m$1_at_genma.iac.net...
> None that I can figure. In fact, I would assume an assignment statement
> would be faster because it is processed by the PL/SQL engine and the
 select
> from dual would require a switch to the SQL engine.
>
> I have heard that in SQL Server you have to do this instead of direct
> assignments. Maybe the previous programmer came from a M$ background?
>
> "Joseph Ranseth" <webmaster_at_NOSPAM.worldcupfishing.com> wrote in message
> news:XBq96.802$wb7.16241_at_news1.mts.net...
> > Okay, that makes sense....but in cases that I've seen functions used -
 I'm
> > assuming that there is no benefit whatsoever?
> >
> > Thanks.
> >
> > <steveee_ca_at_my-deja.com> wrote in message
> > news:945agl$s3v$1_at_nnrp1.deja.com...
> > > Hi,
> > >
> > > The direct assignment syntax won't work if the assignment you're
 trying
> > > to make is not a function. For instance, the nextval of a sequence
> > > called my_seq couldn't be assigned with:
> > >
> > > v_next := my_seq.nextval;
> > >
> > > You need to :
> > >
> > > SELECT MY_SEQ.NEXTVAL
> > > INTO v_next FROM DUAL;
> > >
> > > Hth,
> > >
> > > Steve
> > >
> > >
> > >
> > >
> > > In article <wtp96.790$wb7.15596_at_news1.mts.net>,
> > > "Joseph Ranseth" <jransethNO_SPAM_at_hotmail.com> wrote:
> > > > I have come across many instances where people use a select from
 dual
 to
> > > > determine or assign a value to a local variable, for example:
> > > >
> > > > SELECT sysdateinto l_date FROM dual
> > > >
> > > > what is the benefit of this over using a standard assignment
 expression?
> > > > ie: l_date := sysdate;
> > > >
> > > > Just wondering....
> > > > thanks in advance.
> > > >
> > > > JR
> > > >
> > > >
> > >
> > >
> > > Sent via Deja.com
> > > http://www.deja.com/
> >
> >
>
>
Received on Wed Jan 17 2001 - 19:09:10 CST

Original text of this message

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