GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

  GeekInterview.com  >  Interview Questions  >  Oracle  >  SQL

 Print  |  
Question:  Difference between an implicit & an explicit cursor.


Answer:
PL/SQL declares a cursor implicitly for all SQL data manipulation statements, including quries that return only one row. However,queries that return more than one row you must declare an explicit cursor or use a cursor FOR loop.
Explicit cursor is a cursor in which the cursor name is explicitly assigned to a SELECT statement via the CURSOR...IS statement. An implicit cursor is used for all SQL statements Declare, Open, Fetch, Close. An explicit cursors are used to process multirow SELECT statements An implicit cursor is used to process INSERT, UPDATE, DELETE and single row SELECT. .INTO statements.


August 08, 2006 02:05:29 #2
 siddhartha saha   Member Since: Visitor    Total Comments: N/A 

RE: Difference between an implicit & an explicit c...
 

begin

for x in (select * from emp) loop

.........................................;

................................;

end loop;

end;

Just tell me which type of cursor that is being used in the above example?

Is explicit or implicit?

     

 

Back To Question