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
what is the difference between where clause and having clause? : Sql dba
Name the operator which is used in the query for pattern matching?
Does user triggers have entry for trigger with compilation errors?
Show the two pl/sql cursor exceptions.
Mention what pl/sql package consists of?
What is cte sql?
What is difference between hql and sql?
How to run sql*plus commands in sql developer?
What is pl sql in dbms?
Why do we use partitions in sql?
Is sqlite thread safe?
How to add, remove, modify users using sql?
What is the purpose of a secondary key?
Can we join 3 tables in sql?
what are the non-standard sql commands supported by 'mysql'? : Sql dba