What is difference between a Cursor declared in a procedure
and Cursor declared in a package specification ?
Answers were Sorted based on User's Feedback
Answer / tulsi
A cursor declared in a package specification is global and
can be accessed by other procedures or procedures in a
package.
A cursor declared in a procedure is local to the procedure
that can not be accessed by other procedures.
Is This Answer Correct ? | 40 Yes | 2 No |
Answer / 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 |
diff b/w sub query and co-relater query?
Can u create a primary key with out unique index.
7. Where would you look for errors from the database design?
What is a relationship and what are they?
What is the difference between row level and statement level trigger?
How to convert comma separated string to array in pl/sql?
What is rename command in sql?
Is a view faster than a stored procedure?
Does a user_objects view have an entry for a trigger?
Does truncate table reset auto increment?
What is the difference between function and procedure in pl/sql?
What is the difference between stored procedure and view?