| Table Name | Column Name | Data Type | Data Default | Data Default Vc | Data Default Vc2 |
| TED_YM_EPISODES | ID | NUMBER | "TEDSTRUIK"."ISEQ$$_77839".nextval | "TEDSTRUIK"."ISEQ$$_77839".nextval | "TEDSTRUIK"."ISEQ$$_77839".nextval |
| TED_YM_QUOTES | ID | NUMBER | "TEDSTRUIK"."ISEQ$$_96713".nextval | "TEDSTRUIK"."ISEQ$$_96713".nextval | "TEDSTRUIK"."ISEQ$$_96713".nextval |
In SQL you may not always be able to create and use a PL/SQL function, so a pure SQL solution would be nice (and probably faster as well).
Such a solution is shown below, using sys_dburigen - see the view code for ted_p1026_v below.
I found that method at
https://forums.oracle.com/ords/apexds/post/how-to-convert-long-to-any-character-string-varchar2-char-8263.
In database 26ai, a new column data_default_vc was introduced for the [user/all/dba]_tab_cols views, so in the view both that one and the sys_dburigen solution are used to show it actually works :-)
You can use the sys_dburigen solution by itself for other Long columns in other tables of course.
Note: I used a with-clause in the view for performance reasons, but also because I couldn't get it to work without one.
I expected this simpler query to work as well:
However, that one gives an "ORA-19334: invalid column specification for the SYS_DBURIGEN function" error.
Somehow joining the table that is used in sys_dburigen triggers this error, but I can't explain that behavior...