Mega Code Archive

 
Categories / Oracle PLSQL / Constraints
 

Naming contraints

SQL> create table salary   2  ( grade      NUMBER(2)   constraint S_PK primary key   3  , lowerlimit NUMBER(6,2) constraint S_LOWER_NN   4                           not null   5                           constraint S_LOWER_CHK   6                           check (lowerlimit >= 0)   7  , upperlimit NUMBER(6,2) constraint S_UPPER_NN   8                           not null   9  , bonus      NUMBER(6,2) constraint S_BONUS_NN  10                           not null  11  , constraint S_LO_UP_CHK check  12                           (lowerlimit <= upperlimit)  13  ) ; Table created. SQL> SQL> SQL> drop table salary; Table dropped.