Surely an easy question for those in the know...
I have a contacts table, and I'd like to ensure uniqueness across
first/middle/last name fields. Each field is an nvarchar(255) - as
such, I can't create a regular index because the combined index size
is greater than 900 bytes. I've briefly looked into Full-Text
indexing, but it seems to me that it's primarily for searching, and I
can't see how I can use it to enforce uniqueness.
Can I setup a full-text index to enforce uniqueness? Do I need to
enforce this constraint in the app instead of the database?
Thanks for any tips.
Remi.
Hilary Cotter - 26 Oct 2007 15:52 GMT
You could where you would do a check to see if the combination field exists
and if not enter it. You will probably find that plain old non-clustered
indexes will work better here, or even an indexed view. With SQL 2005 use
the include option when creating your indexes.

Signature
RelevantNoise.com - dedicated to mining blogs for business intelligence.
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
> Surely an easy question for those in the know...
>
[quoted text clipped - 11 lines]
>
> Remi.
Rémi - 28 Oct 2007 18:04 GMT
Thanks for the tip.
Found information on including non-key columns in non-clustered
indexes in books online; methinks this is what I was looking for.
Remi.