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