title: SQL Server - Best way to get identity of inserted row?
body: <p>What is the best way to get <code>IDENTITY</code> of inserted row?</p>
  
  <p>I know about <code>@@IDENTITY</code> and <code>IDENT_CURRENT</code> and <code>SCOPE_IDENTITY</code> but don't understand the pros and cons attached to each.</p>
  
  <p>Can someone please explain the differences and when I should be using each?</p>