?
Solved

Unique column

Posted on 2007-08-02
1
Medium Priority
?
214 Views
Last Modified: 2010-03-19
How do I modify a column in management studio to add a constraint that all records in the column must be unique?

ID      int      (PK, Auto Increment)
Expired      bit      
Filename      nvarchar(50)      
Name      nvarchar(50)      
FileType      nvarchar(50)      
BackupFile      nvarchar(50)      
Client      int      
PlacementType      int      

Filename should be unique. Thanks!


0
Comment
Question by:craigdev
1 Comment
 
LVL 75

Accepted Solution

by:
Aneesh Retnakaran earned 2000 total points
ID: 19616892
ALTER TABLE dbo.urTable ADD CONSTRAINT
      UK_urTable_FileName UNIQUE NONCLUSTERED
      (
      FileName
      )
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

by Mark Wills PIVOT is a great facility and solves many an EAV (Entity - Attribute - Value) type transformation where we need the information held as data within a column to become columns in their own right. Now, in some cases that is relatively…
Introduction: When running hybrid database environments, you often need to query some data from a remote db of any type, while being connected to your MS SQL Server database. Problems start when you try to combine that with some "user input" pass…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…
Suggested Courses

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question