Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Unique Key Constraint, Querable index?

Status
Not open for further replies.

SteveDingle

Programmer
Joined
Jul 26, 2004
Messages
254
Location
GB
Heya All,

All my tables have surrogate PK's which means that all my tables also have alternate keys which I am currently enforcing using Unique Key Constraint as opposed to a Unique Index. My question is, does the constraint help in querying against the table? If not should I also have a index on the AK expression or should I just be using a unique index as opposed to a constraint

This is important since often the AK's are used to retrieve a record as opposed to the PK

Thanks!
 
as far as i know a unique constraint is implemented as a unique index, so you're okay

r937.com | rudy.ca
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top