What is difference between a Cursor declared in a procedure
and Cursor declared in a package specification ?

Answer Posted / ratan singh sengar

SP is a set of SQL Statements that resides in server. Advantage of SP is just that it is pre compiled and available in the server. So, whenever this SP is called, its executed instantly since its already been compiled. This makes the faster performance while executing the SP.
cursor:
Cursors are add on feature of SP , for row by row validations.
For instance : You have a list of employees belong to various department. For calculating the bonus % which varies for department to department, you use cursors to calculate Bonus.

Is This Answer Correct ?    0 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is cartesian join in sql?

559


What is sql partition?

552


When can we use the where clause and the having clause?

580


what are all types of user defined functions? : Sql dba

548


What is posting?

609






What is sql profiler in oracle?

568


What is a join query?

553


what is a view? : Sql dba

638


What are system versioned tables?

553


What is the syntax to add a record to a table?

577


What is data manipulation language?

702


What is the difference between a database and a relational database?

560


What is a constraint?

567


what are the types of join and explain each? : Sql dba

532


How can we find duplicate records in a table?

514