how to reference columns as dynamic selectables in select query
cursor C1 is
select col1, col2 from table1;
/* assume col1 is returning EMP_NAME & col2 is returning EMP_ID*/
in the code we are referring to C1 as below
OPEN C1
FETCH into l_col1, l_col2; /*l_col1 & l_col2 are user defined variables in the procedure */
select l_col1,l_col2 fetch into l_emp_name, l_emp_id from EMP_DETAILS; /* l_emp_name and l_emp_id are user defined variables in the procedure */
/* we are expecting the query to be evaluated as below.
select EMP_NAME ,EMP_ID fetch into l_emp_name, l_emp_id from EMP_DETAILS;
0