Difference between Primary and Unique key
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 5 of 5

Thread: Difference between Primary and Unique key

  1. #1
    Join Date
    Sep 2000
    Posts
    7

    Smile

    If both Primary and Unique key garantees the uniquness of the rows in a table, is there is reason to choose one over the other when creating a table?

  2. #2
    Join Date
    Feb 2001
    Posts
    290
    Primary Key = Uniqe key + NOT NULL values in the columns.

    So u can guess why we need a primary key

    Thanks,
    Madhu

  3. #3
    Join Date
    Mar 2001
    Location
    Ireland/Dublin
    Posts
    684
    Unique key does not provide NOT NULL, primary key provide uniquness and NOT NULL
    Best wishes!
    Dmitri

  4. #4
    Join Date
    Jan 2001
    Posts
    3,131
    A primary key has to be unique.
    A unique key does not have to be a primary key.

    How many ways can YOU skin a cat?

    MH
    I remember when this place was cool.

  5. #5
    Join Date
    Sep 2000
    Posts
    7
    Thanks a lot.

    Jason

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width