title: Creating New GUID automatically while inserting a new row to an existing table Not Working
body: <p>I have an existing table in MS SQL called myTab.
  It has the following fields</p>
  
  <pre><code>empno(PK) nchar(10),
   age int
  </code></pre>
  
  <p>Now, i want to add a myGUID column and fill it up with a GUID whenever i insert a new row as well as Updating existing rows.</p>
  
  <p>So i added the statement</p>
  
  <blockquote>
    <p>ALTER TABLE myTab ADD myGUID uniqueidentifier DEFAULT NewId() NOT NULL;</p>
  </blockquote>
  
  <p>Updating existing rows works correctly.</p>
  
  <p>But, when i try to insert values,</p>
  
  <blockquote>
    <p>INSERT INTO myTab VALUES ( 1000, 22 );</p>
  </blockquote>
  
  <p>It fails, and gives the following message</p>
  
  <pre><code>**Column name or number of supplied values does not match table definition.**
  </code></pre>
  
  <p>When i do</p>
  
  <blockquote>
    <p>insert into sourav_test2 values (20055711,23,NEWID());</p>
  </blockquote>
  
  <p>The above statement works. </p>
  
  <p>I want a GUID to be filled without changing the insert statement. Is it possible via a Trigger or a Function?</p>