get scope_identity after insert in sql code example Example: how to get inserted id in sql server SELECT SCOPE_IDENTITY();