title: Trouble with uniqueidentifier column
body: <p>I just started working with SQL Server and I have some troubles with adding values to a table with a column of type <code>uniqueidentifier</code>.</p>
  
  <p>The table consists of:  </p>
  
  <pre><code>ID (uniqueidentifier), CODE (nchar(5)), COUNTRY_CODE(nchar(2)), NAME(nchar30)  
  </code></pre>
  
  <p>I tried adding values from Excel and CSV files, basically they look like this:  </p>
  
  <pre><code>DEBE,DE,Berlin
  </code></pre>
  
  <p>I could not load it, always have some errors with this ID field. </p>
  
  <p>When i try to add values manually like:   </p>
  
  <pre><code>INSERT INTO [Portfolio].[dbo].[Regions](CODE, COUNTRY_CODE, NAME) 
  VALUES ('DEBE', 'DE', 'Berlin');
  </code></pre>
  
  <p>It says:</p>
  
  <blockquote>
    <p>Cannot insert the value NULL into column 'ID', table
    'Portfolio.dbo.Regions'; column does not allow nulls. INSERT fails.</p>
  </blockquote>
  
  <p>Of course when I add an <code>id</code> column and a number, I get info that int is incompatible with <code>uniqueidentifier</code>.</p>
  
  <p>I even tried creating a temp table (with <code>id</code> as an <code>INT</code> instead of <code>uniqueidentifier</code>) and copying values from it into this (without <code>ID</code> column, its supposed to generate automatically) </p>
  
  <p>Only thing I can think of is that <code>ID</code> column is not creating values for it automatically and I don't know how to solve this. Can anyone help?</p>