title: SQL Server syntax to create clustered primary key
body: <p>i want to move a table to a new filegroup. Using <a href="https://stackoverflow.com/a/2438060/12597">the accepted answer as a starting point</a>:</p>
  
  <pre><code>CREATE CLUSTERED INDEX CIX_YourTable
     ON dbo.YourTable(YourClusteringKeyFields)
     WITH DROP_EXISTING
     ON [filegroup_name]
  </code></pre>
  
  <p>i adapt it to my use:</p>
  
  <pre><code>CREATE CLUSTERED INDEX PK_AuditLog_AuditLogID
     ON dbo.AuditLog(AuditLogID)
     WITH DROP_EXISTING
     ON [TheOtherFileGroup]
  </code></pre>
  
  <p>gives the error:</p>
  
  <blockquote>
    <p>Msg 1907, Level 16, State 1, Line 1<br>
    Cannot recreate index 'PK_AuditLog_AuditLogID'. The new index definition does not match the constraint being enforced by the existing index.</p>
  </blockquote>
  
  <p>This is, i assume, because <code>PK_AuditLog_AuditLogID</code> is</p>
  
  <ul>
  <li>a clustered index</li>
  <li>a primary key</li>
  </ul>
  
  <p>So i need the syntax to create a primary key clustered index <code>WITH DROP_EXISTING</code></p>