Results 1 to 4 of 4

Thread: How can we create unique key

  1. #1
    Junior Member
    Join Date
    Mar 2008
    Answers
    9

    How can we create unique key

    i am having one table
    here username is there i want to create it as unique
    how can


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

    Re: How can we create unique key

    You need to create an unique constraint on the field.


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

    Re: How can we create unique key

    Quote Originally Posted by boreddy View Post
    i am having one table
    here username is there i want to create it as unique
    how can
    u can use the following script

    ALTER TABLE TableName
    ADD CONSTRAINT uk_username UNIQUE KEY (UserName)


    ---V V---
    Vikas Vaidya


  4. #4
    Junior Member
    Join Date
    May 2008
    Answers
    1

    Re: How can we create unique key

    hi, using constraint at creation table. other we can use alter the particular column....
    ALTER TABLE TableName
    ADD CONSTRAINT uk_username UNIQUE KEY (UserName)


  5.  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