title: Msg 544, Level 16, State 1 error procedure
body: <p>When trying to run an insert statement:</p>
  
  <pre><code>ALTER proc [dbo].[sp_register]
  @code int output,
  @name varchar(50),
  @description varchar,
  @phone int
  as
  insert into user (code,name,description,phone)
  values (@code,@name,@description,@phone)
  set @code = @@IDENTITY 
  </code></pre>
  
  <p>I get the following error:</p>
  
  <blockquote>
    <p>Msg 544, Level 16, State 1, Procedure sp_register, Line 8
    <br>Cannot insert explicit value for identity column in table 'user' when IDENTITY_INSERT is set to OFF.</p>
  </blockquote>