title: How to resolve "The maximum permissible key length is 900 bytes."
body: <p>I have the following table structure:</p>
  
  <pre><code>CREATE TABLE [dbo].[Signature]
  (
      [caption_id] [nvarchar](512) NOT NULL,
      [signature_id] [int] NOT NULL
  )
  </code></pre>
  
  <p>I want to add the primary key with following alter command:</p>
  
  <pre><code>ALTER TABLE [dbo].[Signature] 
  ADD CONSTRAINT [pk__signatures] 
   PRIMARY KEY CLUSTERED ([caption_id] ASC,[signature_id] ASC);
  </code></pre>
  
  <p>When the above alter command is executed, I get the following error:</p>
  
  <p>Msg 1944, Level 16, State 1, Line 1
  Index 'pk__signatures' was not created. This index has a key length of at least 1028 bytes. The maximum permissible key length is 900 bytes.
  Msg 1750, Level 16, State 0, Line 1
  Could not create constraint. See previous errors.</p>
  
  <p>Can anyone help me on this issue?</p>