Strong Refcursor:
1) Provides type safety
2) Have return type
3) Not flexible
Advantage of strong type over weak cursor type: Weak cursor type is more flexible than strong type because they can be used with any query and with any ROWTYPE structure. But it does not provide compiled time verification as to whether the correct type of record has been used for the fetus cursor. The PL / SQL runtime engine will raise the predefined ROWTYPE_MISMATCH exception at runtime, if the query and INTO clauses are not structurally matched.
Weak Refcursor:
1) Does not provide type safety
2) Does not have return type
3) Weak refcursor are flexible i.e. it can be used in any query with any datatype
Advantage of strong cursor type over weak type: When we declare strong cursor type, we get the benefit of compile time validation by the compiler, whether we have changed the FETCH statements of the cursor variable to the query list / correct record type of its cursor object. Be properly matched with. The term, strong cursor type provides protection and avoids run time failure.
Please do check our daily posts, videos for beneficial informations, in case of any additional queries please do contact us, we are happy to assist you.
https://www.youtube.com/a4uofficial
0 Comments