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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Select one row

Re: Select one row

From: raji <no_diggity2_at_yahoo.com>
Date: Fri, 13 Nov 1998 17:59:43 +0800
Message-ID: <72gvuh$366$1@news.cowan.edu.au>


try this.. as an example... if I wanted to put a value at a time from a table onto the screen as a message.

cursor temp_cur is
select field1, field2, field3
from <tablename>;

temp_var varchar2(255);

temp_rec temp_cur%rowtype

begin
open temp_cur;

    fetch temp_cur into temp_rec;
    exit when temp_cur%NOTFOUND;
    temp_var := temp_rec.field1;
close temp_cur;
end

note:
a cursor is a constrained select statement, it can hold

select
from
where
order by

Raj! no_diggity2_at_yahoo.com

Kenneth Herskedal wrote in message <364949b1.0_at_d2o204.telia.com>...
>How can I select only the first row from a table.
>
>My select statement returns several rows, but I'm only interested in the
>first row of the result set.
>
>
>
>
Received on Fri Nov 13 1998 - 03:59:43 CST

Original text of this message

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