You can create a lot of constraints … 

tested in 12.2

You can create a lot of constraints …

create table aa (bbb varchar2(10) not null);

Table created.

alter table aa add (check (bbb is not null) enable validate);

Table altered.

alter table aa add (check (bbb is not null) enable validate);

Table altered.

alter table aa add (check (bbb is not null) enable validate);

Table altered.

 

select CONSTRAINT_NAME from user_constraints where table_name=’AA’
/

CONSTRAINT_NAME
——————————————————————————–
SYS_C006873
SYS_C006874
SYS_C006875
SYS_C006876

SQL> alter table aa add (check (bbb is not null) enable validate);

Table altered.

/

Table altered.

select CONSTRAINT_NAME from user_constraints where table_name=’AA’ /

CONSTRAINT_NAME
——————————————————————————–
SYS_C006873
SYS_C006874
SYS_C006875
SYS_C006876
SYS_C006877
SYS_C006878

6 rows selected.

and more constaints

alter table aa add (check (bbb IN (‘DBE’, ‘DSE’, ‘DPK’)) ENABLE VALIDATE);

Table altered.

/

Table altered.

/

Table altered.

 

alter table aa add (check (bbb IN (‘DBE’, ‘DSE’, ‘DPK’)) ENABLE VALIDATE);

 

select CONSTRAINT_NAME from user_constraints where table_name=’AA’
/

CONSTRAINT_NAME
——————————————————————————–
SYS_C006873
SYS_C006874
SYS_C006875
SYS_C006876
SYS_C006877
SYS_C006878
SYS_C006879
SYS_C006880
SYS_C006881

9 rows selected.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s