Results 1 to 6 of 6

Thread: Unique Constraint in SQL

  1. #1
    Junior Member
    Join Date
    Apr 2009
    Answers
    3

    Unique Constraint in SQL

    Can a UNIQUE constraint be applied to more than one field in a SQL server database table?


  2. #2
    Junior Member
    Join Date
    Apr 2009
    Answers
    1

    Re: Unique Constraint in SQL

    it cant be applied


  3. #3
    Junior Member
    Join Date
    Apr 2009
    Answers
    3

    Re: Unique Constraint in SQL

    I am slightly confused here......(I am a newbie to SQL so please bear with me....)

    If you can have more than one UNIQUE field in a data table, how can a UNIQUE constraint be not applied to more than one field?


  4. #4
    Contributing Member
    Join Date
    Jun 2007
    Answers
    65

    Re: Unique Constraint in SQL

    Your doubt is absolutely right.

    Yes, we can have Unique constranit on more than one column, that's for sure.


    ---V V---
    Vikas Vaidya


  5. #5
    Moderator
    Join Date
    Jun 2007
    Answers
    2,074

    Re: Unique Constraint in SQL

    You can add several unique constraints to a database table. But not the same constraint that means the name of the constraints should be different.


  6. #6
    Junior Member
    Join Date
    May 2009
    Answers
    2

    Re: Unique Constraint in SQL

    Table can have multiple unique constraints ..but only one PK


  7.  Sponsored Ads
    Ad


     

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact