title: Sql Server return the value of identity column after insert statement
body: <p>Is it possible in sql server using stored procedure to return the identity column value in a table against which some values are inserted? For example using stored procedure if we insert data in a table:</p>
  
  <p>Table TBL</p>
  
  <ul>
  <li>UserID integer, identity, auto-incremented</li>
  <li>Name varchar</li>
  <li>UserName varchar</li>
  <li>Password varchar  </li>
  </ul>
  
  <p>So if I run the store procedure inserting some values like:</p>
  
  <pre><code> Insert into TBL (Name, UserName, Password)
   Values ('example', 'example', '$2a$12$00WFrz3dOfLaIgpTYRJ9CeuB6VicjLGhLset8WtFrzvtpRekcP1lq')
  </code></pre>
  
  <p>How can I return the value of <code>UserID</code> at which this insertion will take place. I need The value of UserID for some other operations, can anybody solve this?</p>