|
-
Let me spice this one a little - even when risking to add some confusion.
PK constraints do not require a unique index, you can create a PK on a non-unique index. Moreover, in some cases it is mandatory to do so - like when you are asking Oracle to defer contraints checking until the end of the transaction.
After you digest this one start thinking about the crazy (and useful) things you can do manipulating VALIDATE/NOVALIDATE and ENABLE/DISABLE option.
So, does in general a PK comes alongside a unique index? Yes... but that does not means it has to be unique.
Pablo (Paul) Berzukov
Author of Understanding Database Administration available at amazon and other bookstores.
Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|