title: Create a nonclustered non-unique index within the CREATE TABLE statement with SQL Server
body: <p>It is possible to create a primary key or unique index within a SQL Server CREATE TABLE statement. Is it possible to create a <strong>non-unique</strong> index within a CREATE TABLE statement?</p>
  
  <pre><code>CREATE TABLE MyTable(
      a int NOT NULL
      ,b smallint NOT NULL
      ,c smallint NOT NULL
      ,d smallint NOT NULL
      ,e smallint NOT NULL
  
      -- This creates a primary key
      ,CONSTRAINT PK_MyTable PRIMARY KEY CLUSTERED (a)
  
      -- This creates a unique nonclustered index on columns b and c
      ,CONSTRAINT IX_MyTable1 UNIQUE (b, c)
  
      -- Is it possible to create a non-unique index on columns d and e here?
      -- Note: these variations would not work if attempted:
      -- ,CONSTRAINT IX_MyTable2 INDEX (d, e)
      -- ,CONSTRAINT IX_MyTable3 NONCLUSTERED INDEX (d, e)
  );
  GO
  
  -- The proposed non-unique index should behave identically to
  -- an index created after the CREATE TABLE statement. Example:
  CREATE NONCLUSTERED INDEX IX_MyTable4 ON MY_TABLE (d, e);
  GO
  </code></pre>
  
  <p>Again, the goal is to create the non-unique index within the CREATE TABLE statement, not after it.</p>
  
  <p>For what it's worth, I did not find the <a href="http://msdn.microsoft.com/en-us/library/ms174979.aspx" rel="noreferrer">[SQL Server Books Online entry for CREATE TABLE]</a> to be helpful.</p>
  
  <p>Also, <a href="https://stackoverflow.com/questions/2689930/how-to-create-nonclustered-index-in-create-table">[This Question]</a> is nearly identical, but the accepted answer does not apply.</p>