How to get Insert id in MSSQL in PHP?

前端 未结 3 1129
南方客
南方客 2020-11-27 23:48

What the question title says. With a query such as SELECT @@IDENTITY AS ins_id, do I need to supply the table name or any other info to specify which table/data

3条回答
  •  [愿得一人]
    2020-11-27 23:53

    No; it works much like SELECT LAST_INSERT_ID() in mysql, retrieving the last identity value inserted. You may want to take a look at this in-depth examination for more on what you might want to be concerned about with it.

提交回复
热议问题