|
-
On a primary key column, both NOT NULL and UNIQUE constraints will
enabled. Where as if there is only UNIQUE constraint on a column,
NULL values could be inserted.
In the queries, if searched for NULL columns with UNIQUE constraint,
the optimizer does a full table scan.
However, null values cannot be inserted into the primary key columns.
Choosing between primary key and unique constraint depend on
the application/design requirement. If the column could take null values
then it cannot be primary key.
hptse
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
|