SQLcl 22.2 MODELLER DDL Exports All Columns As NOT NULL Instead Of NULL
(Doc ID 2885638.1)
Last updated on MARCH 09, 2023
Applies to:
Oracle SQLcl - Version 22.2 and laterInformation in this document applies to any platform.
Symptoms
On : SQL Developer Command Line 22.2 Version, SQLcl Commands
OS : Apple MacOS (64-bit) & MS Windows 10 (64 bit)
ACTUAL BEHAVIOR
SQLcl MODELLER DDL exports all table columns as NOT NULL instead of NULL. In other words, SQLcl adds artificial NOT NULL constraint even though the constraint is not present & it creates below SQL command.
CREATE TABLE test_table(name_nullable VARCHAR2(50) NOT NULL);
EXPECTED BEHAVIOR
It is expected to create below DDL SQL Command
CREATE TABLE test_table(name_nullable VARCHAR2(50));
STEPS
The issue can be reproduced at will with the following steps:
1. Create new Modeler design using SQL Developer Data Modeler
2. Add table TEST_TABLE to the design (Refer screen shot)
3. Add column NAME_NULLABLE, type=VARCHAR2(50), mandatory=Unchecked (Refer screen shot)
4. Save modeler design as design.dmd
5. Open SQLcl
6. Convert the design to DDL using below SQLcl command
SQL>MODELER DDL -design "/path/design.dmd" -relmodel "Relational_1" -outputfile "/path/output.sql"
Cause
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
Symptoms |
Cause |
Solution |
References |