create table FOO (BAR char(1))
Table created.
alter table FOO add constraint FOOBAR check (BAR is not null)
Table altered.
select TABLE_NAME, COLUMN_NAME, NULLABLE from USER_TAB_COLUMNS where TABLE_NAME = 'FOO'
TABLE_NAME | COLUMN_NAME | NULLABLE | FOO | BAR | Y |
---|
select TABLE_NAME, CONSTRAINT_NAME, SEARCH_CONDITION from USER_CONSTRAINTS where TABLE_NAME = 'FOO'
TABLE_NAME | CONSTRAINT_NAME | SEARCH_CONDITION | FOO | FOOBAR | BAR is not null |
---|
alter table FOO drop constraint FOOBAR
Table altered.
alter table FOO modify BAR not null
Table altered.
select TABLE_NAME, COLUMN_NAME, NULLABLE from USER_TAB_COLUMNS where TABLE_NAME = 'FOO'
TABLE_NAME | COLUMN_NAME | NULLABLE | FOO | BAR | N |
---|
select TABLE_NAME, CONSTRAINT_NAME, SEARCH_CONDITION from USER_CONSTRAINTS where TABLE_NAME = 'FOO'
TABLE_NAME | CONSTRAINT_NAME | SEARCH_CONDITION | FOO | SYS_C002822781 | "BAR" IS NOT NULL |
---|
drop table FOO
Table dropped.
create table FOO (BAR char(1))
Table created.
alter table FOO add constraint FOOBAR check (BAR is not null)
Table altered.
select TABLE_NAME, CONSTRAINT_NAME, SEARCH_CONDITION from USER_CONSTRAINTS where TABLE_NAME = 'FOO'
TABLE_NAME | CONSTRAINT_NAME | SEARCH_CONDITION | FOO | FOOBAR | BAR is not null |
---|
select TABLE_NAME, COLUMN_NAME, NULLABLE from USER_TAB_COLUMNS where TABLE_NAME = 'FOO'
TABLE_NAME | COLUMN_NAME | NULLABLE | FOO | BAR | Y |
---|
alter table FOO drop constraint FOOBAR
Table altered.
alter table FOO modify BAR not null
Table altered.
select TABLE_NAME, CONSTRAINT_NAME, SEARCH_CONDITION from USER_CONSTRAINTS where TABLE_NAME = 'FOO'
TABLE_NAME | CONSTRAINT_NAME | SEARCH_CONDITION | FOO | SYS_C002822783 | "BAR" IS NOT NULL |
---|
select TABLE_NAME, COLUMN_NAME, NULLABLE from USER_TAB_COLUMNS where TABLE_NAME = 'FOO'
TABLE_NAME | COLUMN_NAME | NULLABLE | FOO | BAR | N |
---|
drop table FOO
Table dropped.