title: Why can't I specify both a Primary Key and a Unique Constraint on the same table?
body: <p>I'm trying to create a table:</p>
  <pre><code>CREATE TABLE [MyTable]
  (
      [Id] [int] IDENTITY,
      [Column1] [int] NOT NULL,
      [Column2] [int] NOT NULL
  
      CONSTRAINT [PK_MyTable_Id] PRIMARY KEY ([Id])
      CONSTRAINT [UQ_MyTable_Column1_Column2] UNIQUE ([Column1], [Column2])
  )
  </code></pre>
  <p>This script fails with the error:</p>
  <blockquote>
  <p>Both a PRIMARY KEY and UNIQUE constraint have been defined for column
  'Column2', table 'MyTable'. Only one is allowed.</p>
  </blockquote>
  <p>Why is this restriction enforced? How can I create a table with these properties?</p>