Skip to Main Content

Explore Oracle PL/SQL

Free tips and training every month! Subscribe for reminders and more from Office Hours. FAQ

Header container

April 2, 2019

Cursor Variables
Cursor variables (variables declared based on a REF CURSOR type) offer some interesting advantages over "hard-coded" or explicit cursors (CURSOR my_cur IS ...), especially lots of flexibility and the ability to pass a cursor as a parameter or even the return value of a function.

Highlights

01:55 Introduction to cursor variables
02:55 Why use cursor variables?
05:36 Dev Gym use of cursor variables
08:03 Diving into cursor variable syntax and usage
15:15 Q&A: how best to log and propagate exceptions up the stack
23:05 Performance impact of using cursor variables
26:05 Using cursor variables to make dynamic SQL method 4 easier
33:00 Cursor variables and cursor expressions
37:45 More Q&A
39:24 Chris’s experience with cursor variables (before joining Oracle)

Subscribe to give us feedback and be notified of upcoming sessions!

Ask a Question

Ask The Experts - Right Now!

Do you have a question about Cursor Variables. you'd like our experts to answer in their next session? Sign in and submit it here.

Please note that we cannot guarantee to answer all questions. We cannot help you with open Service Requests or account/licensing issues.

Experts

Your Experts
Steven Feuerstein
Steven Feuerstein, Developer Advocate for PL/SQL    
Steven Feuerstein leads a team of Developer Advocate at Oracle Corporation, and is obsessed with the Oracle PL/SQL language, having written ten books on it (all published by O'Reilly Media). He's published over 1400 quizzes on PL/SQL at the Oracle Dev Gym.
Chris Saxon
Chris Saxon, Oracle Developer Advocate for SQL    
Chris Saxon is the quizmaster for the Database Design competitions and an Oracle Developer Advocate for SQL. His job is to help you get the best out of the Oracle Database and have fun with SQL! He's also part of the answer team on Ask TOM and creates YouTube videos at The Magic of SQL channel.