Friday 4 May 2012

modify an existing check constraint in oracle?

Drop and Recreate it.



Oracle "alter table" syntax to drop constraints.


ALTER TABLE TEST_TABLE DROP constraint TEST_TABLE_CC1;


Oracle "alter table" syntax to add a check constraint.


ALTER TABLE TEST_TABLE ADD CONSTRAINT TEST_TABLE_CC1 CHECK ( PAYMENT_MODE IN ( 'CASH' , 'NET_BANKING' , 'CHEQUE' ) );

No comments:

Post a Comment