Re: pl/sql question
Date: 1996/06/14
Message-ID: <4psmbp$1qe_at_inet-nntp-gw-1.us.oracle.com>#1/1
In article <31C15AB1.53AE_at_cpcuiia.org>, Ken Mills <mills_at_cpcuiia.org> writes:
|> StarCrusher wrote:
|> >
|> > Hi all,
|> >
|> > Here's a quick question regarding pl/sql:
|> >
|> > Is it possible to assign values in pl/sql without using :=
|> > perhaps an assignment setting function of some sort.
|> >
|> > Thanx,
|> > Ali
|> > abukhari_at_vpcc.sunysb.edu
|>
|> Why? Where are using PL/SQL?
|>
|> Functions return a value that must be assigned using :=.
|>
|> --
|> Ken Mills
|> West Chester, PA.
|> mills_at_pclogiconline.com
|> mills_at_cpcuiia.org
You can select a value into a variable from dual. The following statements
both do the same thing:
x := 7;
and
SELECT 7 INTO x FROM DUAL;
Direct assignment is far faster though, since it doesn't need to go to the database.
-- ------------------------------------------------------------------------ Scott Urman Oracle Corporation surman_at_us.oracle.com ------------------------------------------------------------------------ Author of _Oracle PL/SQL Programming_ ISBN 0-07-882176-2 Published by Oracle Press - http://www.osborne.com/oracle/index.htm ------------------------------------------------------------------------ "The opinions expressed here are my own, and are not necessarily that of Oracle Corporation" ------------------------------------------------------------------------Received on Fri Jun 14 1996 - 00:00:00 CEST