Results 1 to 2 of 2

Thread: constraint for replacing primary key

  1. #1
    Join Date
    Jan 2020
    Posts
    3

    constraint for replacing primary key

    If I have a table where primary key is composed by 4 attributes and I'm going to introduce the new attribute ID as primary key, which will replace the previous one. It's necessary to insert constraint for the 4 attributes? This constraint will avoid to insert records having the same values in 4 the attributes.
    What do you think? It's necessary to insert the constraint?

  2. #2
    Join Date
    Nov 2002
    Location
    New Jersey, USA
    Posts
    3,932
    If you must keep the combination of 4 attributes unique, then you will need to have a unique key constraint.

Posting Permissions

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