Re: Unique Columns
- From: "Bob Barrows" <reb01501@xxxxxxxxxxxxxxx>
- Date: Sat, 6 Jun 2009 12:42:50 -0400
Excel User wrote:
Hi,
I'm coming from an Access background but do not know how do this is
in an SQL DB.
The SQL has an ID (Identity) but would also like to have another
unique column emailaddress what should this be.
Thanks
Same as Access: create a unique index on the column. The following shows a
suggested naming convention for indexes but you certainly don't need to
follow it:
CREATE UNIQUE INDEX IX_tablename_columnname_U
ON tablename (columnname asc)
Look up the CREATE INDEX topic in SQL Books OnLine (BOL) for more
information.
--
Microsoft MVP - ASP/ASP.NET - 2004-2007
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
.
- Follow-Ups:
- Re: Unique Columns
- From: Excel User
- Re: Unique Columns
- References:
- Unique Columns
- From: Excel User
- Unique Columns
- Prev by Date: Unique Columns
- Next by Date: Re: Unique Columns
- Previous by thread: Unique Columns
- Next by thread: Re: Unique Columns
- Index(es):
Relevant Pages
|