Answer the question
In order to leave comments, you need to log in
PL/SQL How to bind cursor variable to table variable?
Let's say the cursor is declared in the declaration section:
CURSOR current_tab_cursor IS SELECT * FROM emp;
and an empty table type variable
TYPE emp_table_type IS TABLE OF emp%ROWTYPE
INDEX BY BINARY_INTEGER;
Question: how to create a table variable so that it is of type "emp_table_type" and its cursor refers to the cursor "current_tab_cursor" ?
Answer the question
In order to leave comments, you need to log in
You can load the entire selection from the table cursor or part of it into the specified variable, and only then use it.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question