Wrong Behavior With COLLATION_CLAUSE = 'NON_DEFAULT'
(Doc ID 2892064.1)
Last updated on APRIL 17, 2023
Applies to:
Oracle Database - Enterprise Edition - Version 19.8.0.0.0 and laterInformation in this document applies to any platform.
Goal
Wrong behavior with COLLATION_CLAUSE = 'NON_DEFAULT'
Documentation[1] about DBMS_METADATA says regarding COLLATION_CLAUSE that:
< NEVER — Collation clauses are never generated. But when values distinct that ALWAYS or NEVER you always get the literal value in the DDL clause, ex: exec dbms_metadata.set_transform_param(dbms_metadata.session_transform, CREATE TABLE "TEST"."MYTABLE" You can see COLLATE "NON_DEFAULT" that is a wrong value. With COLLATE "NON_DEFAULT" only must be generated if the table has a non-default collation (different from NLS_COMP) established.
ALWAYS — Collation clauses are always generated.
NON_DEFAULT — Collation clauses other than USING_NLS_COMP are generated.>>
'COLLATION_CLAUSE', 'NON_DEFAULT');
select dbms_metadata.get_ddl('TABLE','MYTABLE','TEST') from dual;
(
"COL1" VARCHAR2(13 CHAR) COLLATE "NON_DEFAULT" NOT NULL ENABLE,
"COL2" VARCHAR2(3 CHAR) COLLATE "NON_DEFAULT" NOT NULL ENABLE,
"COL3" VARCHAR2(3 CHAR) COLLATE "NON_DEFAULT" NOT NULL ENABLE
) DEFAULT COLLATION "NON_DEFAULT" SEGMENT CREATION IMMEDIATESolution
To view full details, sign in with your My Oracle Support account.
Don't have a My Oracle Support account? Click to get started!
In this Document
Goal Solution References