title: Is of a type that is invalid for use as a key column in an index?
body: <p>I want to create one table named as <code>tbl_Ticket_Mail_Address</code> . While creating table showing error. </p>
  
  <p>Table:</p>
  
  <pre><code>CREATE TABLE [dbo].[tbl_Ticket_Mail_Address] (
      [Id]           INT            IDENTITY (1, 1) NOT NULL,
      [Designation]  NVARCHAR (MAX) NULL,
      [Emp_ID]       NVARCHAR (MAX) NOT NULL,
      [Emp_Name]     NVARCHAR (MAX) NULL,
      [Mobile]       NVARCHAR (MAX) NULL,
      [Emp_Email]    NVARCHAR (MAX) NULL,
      [Category]     NVARCHAR (MAX) NULL,
      [Created_By]   NVARCHAR (MAX) NULL,
      [Created_Date] DATE           NULL,
      PRIMARY KEY CLUSTERED ([Id] ASC),
      CONSTRAINT [uc_tbl_Ticket_Mail_Address] UNIQUE NONCLUSTERED ([Emp_ID] ASC, [Category] ASC)
  );
  </code></pre>
  
  <blockquote>
    <p>58,1): SQL72014: .Net SqlClient Data Provider: Msg 1919, Level 16, State 1, Line 1 Column 'Emp_ID' in table 'tbl_Ticket_Mail_Address' is of a type that is invalid for use as a key column in an index.
        (58,0): SQL72045: Script execution error.  The executed script:</p>
  </blockquote>
  
  <pre><code>CREATE TABLE [dbo].[tbl_Ticket_Mail_Address] (
      [Id]           INT            IDENTITY (1, 1) NOT NULL,
      [Designation]  NVARCHAR (MAX) NULL,
      [Emp_ID]       NVARCHAR (MAX) NOT NULL,
      [Emp_Name]     NVARCHAR (MAX) NULL,
      [Mobile]       NVARCHAR (MAX) NULL,
      [Emp_Email]    NVARCHAR (MAX) NULL,
      [Category]     NVARCHAR (MAX) NULL,
      [Created_By]   NVARCHAR (MAX) NULL,
      [Created_Date] DATE           NULL,
      PRIMARY KEY CLUSTERED ([Id] ASC),
      CONSTRAINT [uc_tbl_Ticket_Mail_Address] UNIQUE NONCLUSTERED ([Emp_ID] ASC, [Category] ASC)
  );
  </code></pre>
  
  <blockquote>
    <p>(58,1): SQL72014: .Net SqlClient Data Provider: Msg 1750, Level 16, State 0, Line 1 Could not create constraint or index. See previous errors.
        (58,0): SQL72045: Script execution error.  The executed script:
    An error occurred while the batch was being executed.</p>
  </blockquote>