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: PL/SQL how to fetch data from a table and store in a variable

Re: PL/SQL how to fetch data from a table and store in a variable

From: Jason Pepper <jpepper_at_steamer.u-net.com>
Date: Sun, 07 Feb 1999 21:44:50 +0000
Message-ID: <36BE0952.2C1E963B@steamer.u-net.com>



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

Original text of this message

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