Correct use of SCOPE_IDENTITY function within simple stored procedure

后端 未结 3 1818
野性不改
野性不改 2021-02-10 11:20

I\'d like to simply send some information from a simple client to a log file and then use the identity created for further processing.

Is the following use of SCOP

3条回答
  •  星月不相逢
    2021-02-10 11:47

    RETURN SCOPE_IDENTITY() 
    

    is returning a 0 with Dapper.
    I replaced it with

    SELECT SCOPE_IDENTITY()
    

    and now it is returning the actual value.

提交回复
热议问题