Example 1:
Example 2:declare
type tcref is ref cursor;
cref tcref;
ch char:='a';
begin
open cref for select ch from dual;
end;
/
Input truncated to 1 characters
PL/SQL procedure successfully completed.
Why the second variant doesn't work?declare
type tcref is ref cursor;
cref tcref;
ch char:='a';
begin
open cref for 'select ch from dual';
end;
/
Input truncated to 1 characters
declare
*
ERROR at line 1:
ORA-00904: invalid column name
ORA-06512: at line 7