Re: Unique Columns
- From: "Excel User" <euser@xxxxxxxxxxxxx>
- Date: Sat, 6 Jun 2009 22:30:54 +0100
Bob,
Thanks for your reply, is it possible you to let me know. Instead of using the script you wrote, I'm trying to understand by manually doing this first.
If created a field called testuniquefield in my table,
right clicked on the field and selected Indexes/Keys
Add
Selected from Columns 'testuniquefield'
Selected 'Yes' to 'Is Unique'
Is this the way?
Thanks
"Bob Barrows" <reb01501@xxxxxxxxxxxxxxx> wrote in message news:#OLvLXs5JHA.1092@xxxxxxxxxxxxxxxxxxxxxxx
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: Bob Barrows
- Re: Unique Columns
- References:
- Unique Columns
- From: Excel User
- Re: Unique Columns
- From: Bob Barrows
- Unique Columns
- Prev by Date: Re: Unique Columns
- Next by Date: Re: Unique Columns
- Previous by thread: Re: Unique Columns
- Next by thread: Re: Unique Columns
- Index(es):
Relevant Pages
|
Loading