Adding primary constraint on a table if you have duplicated records already .

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sanQUEST
    New Member
    • Aug 2008
    • 7

    Adding primary constraint on a table if you have duplicated records already .

    hi,

    can anybody can tell me how to add pry constraint to a table if it has already duplicated records ? san
  • debasisdas
    Recognized Expert Expert
    • Dec 2006
    • 8119

    #2
    try to add a NOVALIDATE constraint.

    Comment

    • amitpatel66
      Recognized Expert Top Contributor
      • Mar 2007
      • 2358

      #3
      But why you need to do that? A primay key with duplicates??

      Comment

      • sanQUEST
        New Member
        • Aug 2008
        • 7

        #4
        hi,

        thanks , but can you tell me : if we have to use it in 'alter table statement' or any other way ?

        san

        Comment

        • Dilip1983
          New Member
          • Jan 2008
          • 21

          #5
          You can disable the constraint by using alter table statement.

          Then insert records into it.

          But if there will be duplicate records you won't be able to create a Primary Key on that column.

          Comment

          Working...