Explain the difference between cursor declared in procedures and cursors declared in the package specification?



Explain the difference between cursor declared in procedures and cursors declared in the package spe..

Answer / Kunal Jyoti

A cursor declared in procedures is a temporary, server-side variable that holds the result set of a SQL query. It is created and destroyed within the scope of the procedure. On the other hand, cursors declared in package specifications are persistent, meaning they exist until explicitly dropped or the database is shut down. They can be used across multiple procedures.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More SQL PLSQL Interview Questions

What are the advantages of stored procedure?

1 Answers  


Mention what pl/sql package consists of?

1 Answers  


What view means?

1 Answers  


Can procedure in a package be overloaded?

1 Answers   HCL,


Are stored procedures compiled?

1 Answers  


Q1.all the depts which has more then 10 empls? Q2.all the dept which does not have any emply? Q3 all the emp which does not have any dept? Q4 get all the emply detais with the dept details it dept is exit otherwise any emp details? Q5 how to debugg the dynamic sql and packages?

4 Answers   KPIT,


What is the best strategy to use COMMIT in a pl/sql loop?

3 Answers  


I have a tablle like this: cust acc ----------- a 1 b 2 b 3 c 4 c 5 c 6 I Want below o/p: cust acc --------------- a 1 b 2|3 c 4|5|6 Please any one can you have any ideas share me. I have urgent requirement.

7 Answers   MTS,


What is a database? Explain

1 Answers  


How do you break a loop in pl sql?

1 Answers  


Explain what is an index?

1 Answers  


What is sql select statement?

1 Answers  


Categories