title: SQL Server: composite PK issue when columns having different data type
body: <p>see my code it is not working but could not understand why?</p>
  
  <p>i was trying to create composite pk having columns with different data type</p>
  
  <p>when i tried this</p>
  
  <pre><code>CREATE TABLE [dbo].[ControllerActionItems](
      [ControllerName] [varchar](50) NULL,
      [ActionName] [varchar](50) NULL,
      [RoleID] [int] NULL,
  
      primary key ([ControllerName], [ActionName],[RoleID])
  ) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
  </code></pre>
  
  <p><strong>getting this error message</strong> </p>
  
  <blockquote>
    <p>Msg 1709, Level 16, State 1, Line 2 Cannot use TEXTIMAGE_ON when a
    table has no text, ntext, image, varchar(max), nvarchar(max),
    non-FILESTREAM varbinary(max), xml or large CLR type columns.</p>
  </blockquote>
  
  <h2>solved updated code</h2>
  
  <pre><code>CREATE TABLE [dbo].[ControllerActionItems](
      [ControllerName] [varchar](50) NOT NULL,
      [ActionName] [varchar](50) NOT NULL,
      [RoleID] [int] NOT NULL,
  
      primary key ([ControllerName], [ActionName],[RoleID])
  ) 
  </code></pre>