title: Create Primary Key with Specific Name when Creating Table
body: <p>how to create Primary key with a specific name when creating the table itself. </p>
  
  <p>I wanted to know if we can create Primary Key as part of the table name as well, and also give it a name at the same time. Though it would look very normal to all experienced developers, it can be still confusing to many.</p>
  
  <p>What am I doing wrong?</p>
  
  <p><code>CREATE TABLE [dbo].[TestTable](
  [ID] [int] IDENTITY(1,1) NOT NULL,
  [FirstName] [varchar](100) NULL)
  GO
  ALTER TABLE [dbo].[TestTable] ADD  CONSTRAINT [PK_TestTable] PRIMARY KEY CLUSTERED
  ([ID] ASC)
  GO
  </code></p>
  
  <p>Thanks,Mahendra</p>