Unique column

Posted on 2007-08-02
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!

Question by:craigdev
    1 Comment
    LVL 75

    Accepted Solution

          UK_urTable_FileName UNIQUE NONCLUSTERED

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Do You Know the 4 Main Threat Actor Types?

    Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

    INTRODUCTION: While tying your database objects into builds and your enterprise source control system takes a third-party product (like Visual Studio Database Edition or Red-Gate's SQL Source Control), you can achieve some protection using a sing…
    This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
    This video is in connection to the article "The case of a missing mobile phone (". It will help one to understand clearly the steps to track a lost android phone.
    Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

    760 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

    Need Help in Real-Time?

    Connect with top rated Experts

    7 Experts available now in Live!

    Get 1:1 Help Now