Skip to Main Content

SQL & PL/SQL

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!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

add unique constraint only if it not exists

sql_coderJun 17 2010 — edited Jun 17 2010
hello racle community,

I would like to create a unique constraint (at least over two columns) on several tables via a script. Is there any way to fire the ALTER TABLE statement only when a constraint over the same columns does not exists already ? Or do I have to query the USER_CONSTRAINTS table first ?

Ikrischer
This post has been answered by Peter K on Jun 17 2010
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 15 2010
Added on Jun 17 2010
5 comments
4,663 views