Subject | Primary Key and Unique Index |
---|---|
Author | chee hee |
Post date | 2008-04-01T02:51:29Z |
Hi All,
My company's DBA has given me a table creation script.
In the script, he has primary key and unique index on the same fields.
For example, we have something like this:
ALTER TABLE config ADD CONSTRAINT pk_config PRIMARY KEY (config_item, config_value);
CREATE UNIQUE INDEX ui_config ON config (config_item, config_value);
Is it necessary to have the unique index created since we already have PK on those columns?
Thanks,
CM
Send instant messages to your online friends http://uk.messenger.yahoo.com
[Non-text portions of this message have been removed]
My company's DBA has given me a table creation script.
In the script, he has primary key and unique index on the same fields.
For example, we have something like this:
ALTER TABLE config ADD CONSTRAINT pk_config PRIMARY KEY (config_item, config_value);
CREATE UNIQUE INDEX ui_config ON config (config_item, config_value);
Is it necessary to have the unique index created since we already have PK on those columns?
Thanks,
CM
Send instant messages to your online friends http://uk.messenger.yahoo.com
[Non-text portions of this message have been removed]