Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Strong Type Dynamic Cursor?

655717Aug 21 2012 — edited Aug 22 2012
I'm currently using Oracle 11.2G and I was wondering if you can declare a dynamic cursor as a strong ref cursor type or can it only be declared as weak type ref cursor? Now, if it can only be declared as a weak type ref cursor, is there any way to avoid having to explicitly declare the type and field names being returned by the cursor? Meaning, is there anyway to avoid have to do something like this...
TYPE example_rec IS RECORD
(
 col1 VARCHAR2,
 col2 NUMBER,
 col3 NUMBER,
 etc...
)
Instead, I was wondering if I could just set the fields and their types by setting them as a TABLE OF the ref cursor?

The reason I'm wondering if this is possible is because I have a lot of fields being returned in my cursor, and I was hoping on avoiding having to type each one out and its type. Plus, I think it would be make maintenance much easier.
This post has been answered by Billy Verreynne on Aug 22 2012
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 19 2012
Added on Aug 21 2012
12 comments
496 views