Preserve capitalization of column names/keys returned by SYS_REFCURSOR in Oracle
Too long for a comment.
When I did a
declare
cursor_number number;
description_table dbms_sql.desc_tab;
l_cursor SYS_REFCURSOR;
column_count number;
begin
OPEN l_cursor for SELECT dummy as &quot;Dummy&quot; from dual;
cursor_number:=dbms_sql.TO_CURSOR_NUMBER(l_cursor);
dbms_sql.describe_columns(cursor_number,column_count,description_table);
for k in 1..column_count loop
    dbms_output.put_line(description_table(k).col_name);
    end loop;
end;
/

the ouput is
Dummy

as expected. So SYS_REFCURSOR behaves correctly.
Also
create table productnew (productid  number)
/
declare
cursor_number number;
description_table dbms_sql.desc_tab;
l_cursor SYS_REFCURSOR;
column_count number;
begin
OPEN l_cursor for SELECT p.productid as &quot;ProductID&quot; from productnew p;
cursor_number:=dbms_sql.TO_CURSOR_NUMBER(l_cursor);
dbms_sql.describe_columns(cursor_number,column_count,description_table);
for k in 1..column_count loop
    dbms_output.put_line(description_table(k).col_name);
    end loop;
end;
/

returns
ProductID

So the problem isn't at the database.