Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Re: SELECT from DUAL??
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 - 17:40:06 CST
![]() |
![]() |