How to execute ref cursor in oracle

14.01.2019 Admin

The strong ref cursors have a limitation that they have fixed return type which can only be a record datatype. But this definitely requires an extra step of creating a user defined record datatype. Home ref cursor how to use ref cursor example.

And you have two stored procedures named spsinglerefcur and sptworefcursor. Choose the last radio button load into grid from memory strong and weak. Suppose, you have two tables named products and categories with one-to-many relation. I tested the code in scott schema with emp and dept tables. I need to maintain the exact start and end time of proc in log table.

For the weak ref cursor the structure does not need to be known at compile time. In the previous tutorial we learnt how to fetch data of different datatypes from different columns using the strong ref cursor.

The procedure returns all category rows via this cursor. This article is tested in oracle9i and it should work in oracle10g and further versions. Click right most icon of the opened window as shown below.