Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: assigning variable in SQL*Plus
On Thu, 01 Apr 1999 21:15:04 GMT, andyho99_at_my-dejanews.com
wrote:
>I was wondering whether we can assign a value to a variable from sql
>statement in SQL*Plus.
Do you mean assign a value to a substitution variable? Yes, there is a trick for that. Try the following:
column todays_date new_value todays_date_var
select sysdate todays_date from dual;
select '&&todays_date_var' from dual; (or try define)
My book, SQL*Plus, the Definitive Guide, talks about this in more detail.
regards,
Jonathan Received on Sat Apr 03 1999 - 17:26:01 CST
![]() |
![]() |