Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: PL/SQL how to fetch data from a table and store in a variable
create or replace procedure p1 (p_empno in number) is
cursor c1 is
select e.ename
from emp e
where e.empno = p_empno
--
l_ename scott.emp.ename%type;
--
begin
open c1;
fetch c1 into l_ename;
close c1;
or
for c_rec in c1
loop
l_ename := c_rec.emp;
end loop;
--
exception
when others then
dbms_output.put_line(sqlerrm);
end;
stroppel wrote:
hello,i want to read a table with a query. the results should be stored in
variable.record, temp-table, variable...
i dont know how to do???
i need a little help.
thanks
-- Regards Jason *-------------------------------------------------* | Jason Pepper jpepper@steamer.u-net.com | | | | ... look out Bill, the Penguin is coming | | | *-------------------------------------------------*
Received on Sun Feb 07 1999 - 15:44:50 CST