| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.tools -> Re: SELECT INTO
In article <3912E803.F12298AF_at_fast.no>,
kev <kevin.porter_at_fast.no> wrote:
> Hi,
>
> How do I use SELECT INTO?
>
> I couldn't find an explanation on Oracle's site, please could someone
> give me a URL.
>
> thanks,
>
> - Kev
>
>
select ... into ... from ...
is used to fetch AT LEAST one row and AT MOST one row from a query. It is shorthand for:
open C;
fetch C into ....;
if ( sql%rowcount = 0 ) then ERROR;
fetch C into ....;
if ( sql%rowcount <> 0 ) then ERROR;
close C;
support for the INTO clause in a select is language/environment dependent (eg: you would not use INTO in SQLPlus directly from a select but you might use INTO in sqlplus inside a plsql block).
-- Thomas Kyte tkyte_at_us.oracle.com Oracle Service Industries http://osi.oracle.com/~tkyte/index.html -- Opinions are mine and do not necessarily reflect those of Oracle Corp Sent via Deja.com http://www.deja.com/ Before you buy.Received on Fri May 05 2000 - 00:00:00 CDT
![]() |
![]() |