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:
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
);
If we create DDL for this table from PLSQL developer, it looks like this:
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);
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!!!