rename column_value


SQL> create or replace type t is
2 table of varchar2(12);
3 /
Type created.

SQL> create or replace function f return t is
2 begin return t('foo'); end;
3 /
Function created.

SQL> select * from table(f);

COLUMN_VALUE
------------
foo

What is this column_value field? It is a pseudo-column. But you may want to have an user-defined column name.


SQL> create or replace type o is
2 object(BAR varchar2(12));
3 /
Type created.

SQL> create or replace type t is
2 table of o;
3 /
Type created.

SQL> create or replace function f return t is
2 begin return t(o('foo')); end;
3 /
Function created.
SQL> select * from table(f);

BAR
------------
foo

2 thoughts on “rename column_value

Comments are closed.