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 cartesian join in sql?
What is sql partition?
When can we use the where clause and the having clause?
what are all types of user defined functions? : Sql dba
What is posting?
What is sql profiler in oracle?
What is a join query?
what is a view? : Sql dba
What are system versioned tables?
What is the syntax to add a record to a table?
What is data manipulation language?
What is the difference between a database and a relational database?
What is a constraint?
what are the types of join and explain each? : Sql dba
How can we find duplicate records in a table?