title: Altering an existing column to 'Primary Key' and 'NOT NULL' without dropping the table
body: <p>I have a table named dbo.ReferenceDetails which contains several millions of records.  Here is the create and select script of my table :</p>
  
  <pre><code>CREATE TABLE [dbo].[RefDetails](
        [REQ_XREF_TYPE] [varchar](12) NULL
      , [REQUEST_ID] [varchar](24) NULL
      , [CROSS_REFERENCE] [varchar](32) NULL
      , [RUN_BY] [varchar](100) NULL
      , [RUN_DATE] [datetime] NULL
      , [ISCURRENTRECORD] [int] NULL
      , [RECORDSTARTDATE] [datetime2](7) NULL
      , [RECORDENDDATE] [datetime2](7) NULL
      , [UPDATE_FLAG] [varchar](50) NULL
      , [SECUREFLAG] [int] NULL
      , [EVENT_TIMESTAMP] [datetime2](7) NULL 
      ) ON [PRIMARY]
  
  SELECT TOP (10) 
     [REQ_XREF_TYPE]
    ,[REQUEST_ID]
    ,[CROSS_REFERENCE]
    ,[RUN_BY]
    ,[RUN_DATE]
    ,[ISCURRENTRECORD]
    ,[RECORDSTARTDATE]
    ,[RECORDENDDATE]
    ,[UPDATE_FLAG]
    ,[SECUREFLAG]
    ,[EVENT_TIMESTAMP]
  FROM [dbo].[ReferenceDetails]
  </code></pre>
  
  <p>Can I alter the table so that <code>REQ_XREF_TYPE</code>, <code>ISCURRENTRECORD</code> and <code>EVENT_TIMESTAMP</code> is Primary Key and <code>NOT NULL</code> without dropping the table?</p>
  
  <p>Your response will be appreciated. :)</p>