Named check constraints - 05/08/22 09:44 PM
Guys,
is there any way to keep named not null check constraints in original style when DDL is generated? Example:
This is original DDL script for table creation:
If we create DDL for this table from PLSQL developer, it looks like this:
Though from DB perspective they work in the same way, there is some difference from dictionary perspective - in the first case column is shown as "not nullable" in dba_tab_cols, while in the second - it is "nullable". This leads to some problems with automatic code generators that are using info from dba_tab_cols view.
Thank you!!!
is there any way to keep named not null check constraints in original style when DDL is generated? Example:
This is original DDL script for table creation:
Code
create table TEST_CONS ( col1 VARCHAR2(10) constraint CK_col1_not_null not null, col2 VARCHAR2(10), col3 VARCHAR2(10) constraint CK_col3_not_null not null );
Code
create table TEST_CONS ( col1 VARCHAR2(10), col2 VARCHAR2(10), col3 VARCHAR2(10) ); -- Create/Recreate check constraints alter table TEST_CONS add constraint CK_COL3_NOT_NULL check ("COL3" IS NOT NULL); alter table TEST_CONS add constraint CK_COL1_NOT_NULL check ("COL1" IS NOT NULL);
Thank you!!!