RE: Unique Table

RE: Unique Table

 

  

It is a constraint, but create an index:

CREATE UNIQUE INDEX index_name on schema.table(columns)

-----Original Message-----
From: Tushar Dave
[mailto:mssqldba-ezmlmshield-x32971559.[Email address protected]
Sent: Thursday, November 29, 2007 5:37 AM
To: LazyDBA Discussion
Subject: RE: Unique Table

Unique constraints.

Tushar Dave
Intrack Inc

-----Original Message-----
From: Crafford R. (Ruan)
[mailto:mssqldba-ezmlmshield-x6148370.[Email address protected]
Sent: Thursday, November 29, 2007 3:51 PM
To: LazyDBA Discussion
Subject: Unique Table

Hello all,

I have a table in SQL2005 that is not referenced by a primary or foreign
key, however there is a column that should contain unique values,
meaning that not 1 row in the column may be the same. How can i enforce
this?

thanks
R

********************
Nedbank Limited Reg No 1951/000009/06. The following link displays the
names of the Nedbank Board of Directors and Company Secretary. [
http://www.nedbank.co.za/terms/DirectorsNedbank.htm ] This email is
confidential and is intended for the addressee only. The following link
will take you to Nedbank's legal notice. [
http://www.nedbank.co.za/terms/EmailDisclaimer.htm ]
********************


---------------------------------------------------------------------
TO REPLY TO EVERYBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY To post a
dba job: http://jobs.lazydba.com To subscribe : http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html





---------------------------------------------------------------------
TO REPLY TO EVERYBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY To post a
dba job: http://jobs.lazydba.com To subscribe : http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html


MS Sql Server LazyDBA home page