Home » SQL & PL/SQL » SQL & PL/SQL » how to execute cursors
how to execute cursors [message #424] Mon, 11 February 2002 18:43 Go to next message
ranjan kumar dash
Messages: 15
Registered: February 2002
Junior Member
after writting a cursor in sql prompt how i will compile it and after compilation how i will excute it
Re: how to execute cursors [message #428 is a reply to message #424] Mon, 11 February 2002 19:09 Go to previous message
Satish Shrikhande
Messages: 167
Registered: October 2001
Senior Member
Cursor -
What are the Types - Implicit/Explicit
Where to define - Define it in declare section
How to Use -
cursor c1 is
select * from emp ;
When to use - When there is nay ppossibility of getting more than one record which we can't use in INTO .

Declare
cursor c1 is
select * from emp ;
begin
for z in c1 loop
dbms_output.put_line(z.empno);
end loop;
end;

set serverout on
Previous Topic: how to use instr?
Next Topic: Better Hard SQL Window?
Goto Forum:
  


Current Time: Tue Aug 11 19:28:26 CDT 2020