Sql Server return the value of identity column after insert statement

前端 未结 7 671
甜味超标
甜味超标 2020-12-13 17:44

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

7条回答
  •  庸人自扰
    2020-12-13 18:25

    Insert into TBL (Name, UserName, Password) Output Inserted.IdentityColumnName
     Values ('example', 'example', 'example')
    

提交回复
热议问题