A ref cursor is just the same as a regular cursor with the difference being that you use a REF cursor when you do not know in advance the tables/columns you will be selecting/from. e.g In pseudocode
if(x)
then
open my_ref_cursor for select integer_col from table1
else
open my_ref_cursor for select string_col from table2
endif
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.