Difference between strong and weak ref_cursor in oracle
Asked Answered
F

2

1

I want to know the practical difference between strong and weak ref cursor.

Strong ref_cursor will always use to return a value and compiler know the structure during the compile time, but in the weak ref cursor it will not return a value and compiler dosen't know the structure during the compile time.

This is the basic difference but my question is what value will be returned by the strong ref cursor and where that returned value will be used.

Facility answered 18/5, 2011 at 9:31 Comment(0)
S
7

A strongly typed ref cursor always returns a known type, usually from a declared TYPE object. The compiler can find problems in a PL/SQL block by comparing the types returned to how they are used.

A weakly typed ref cursor has a return type that is dependant on the SQL statement it executes, i.e. only once the cursor is opened is the type known (at runtime). The compiler cannot determine the types until it is ran, so care must be taken to ensure that the cursor result set is handled properly to avoid runtime errors.

Strati answered 18/5, 2011 at 10:3 Comment(0)
D
0

there is one more difference between strong and weak reference cursor is that dynamic query is not possible in strong reference cursor where as it is possible in weak reference cursor

Disharmony answered 28/12, 2012 at 16:56 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.