V
V
Vaper672016-05-29 09:43:04
Oracle
Vaper67, 2016-05-29 09:43:04

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

1 answer(s)
K
Konstantin, 2016-06-23
@Vaper67

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 question

Ask a Question

731 491 924 answers to any question