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
How to call a javascript function from pl sql?
Can we use view in stored procedure?
Can a select statement fire a trigger?
what are the authentication modes in sql server? How can it be changed? : Sql dba
What is use of package in pl sql?
what is the difference between cluster and non cluster index? : Sql dba
How to change a value of the field ‘salary’ as 7500 for an employee_name ‘john’ in a table employee_details?
what is uncommittable transactions? : Transact sql
Define union, minus, union all, intersect ?
What is parameter substitution in sql?
what is a constraint? : Sql dba
Show the two pl/sql cursor exceptions.
What is a call statement? Explain with an example.
Why function is used in sql?
Is sql better than excel?