Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Select one row
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