Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to modify a CHECK constraint.

Balajim-OracleJul 11 2010 — edited Jul 11 2010
We need to modify a check constraint to allow new values. Is there a way we can modify the existing constraint or should we drop and recreate including new values.

Example:
We have a table SLOG and SNO is a column accepting numeric values. Currently there is a constraint on this column so that it accepts values of 1,2,3,4. Now I want to insert a value of 5 to this column. Since there is a CHECK constraint on this column it prevents the value of 5.

So the constraint needs to be modified. Is there a way we can modify the constraint using a DDL command (like ALTER TABLE) or should I drop and re create the constraint.

Thanks in advance.
Balaji
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 8 2010
Added on Jul 11 2010
2 comments
1,330 views