Return the id of the just added row

前端 未结 5 1332
广开言路
广开言路 2020-12-21 13:03

In a similar vein to my previous question I again ask the SO guys for your collective wisdom and help.

In a stored procedure and after passing some checks I need to i

5条回答
  •  醉梦人生
    2020-12-21 13:31

    You need to use the OUTPUT clause

    http://blog.jemm.net/articles/databases/how-to-using-sql-server-2005s-output-to-return-generated-identity/

    ...which, as pointed out, is only available in sqlserver 2005. Plz disregard.

提交回复
热议问题