开发者

how i can get the ID generated in the last query by php with sql server [duplicate]

开发者 https://www.devze.com 2023-02-22 16:17 出处:网络
This question already has answers here: Closed 11 years ago. 开发者_Go百科 Possible Duplicate: How to get Insert id in MSSQL in PHP?
This question already has answers here: Closed 11 years ago. 开发者_Go百科

Possible Duplicate:

How to get Insert id in MSSQL in PHP?

how i can get the ID generated in the last query by php with sql server, i know how do it by mysql mysql_inserted_id but with sql server i cant pleass help


You can try @@Identity.

SELECT ID AS LastID FROM Persons WHERE ID = @@Identity;
0

精彩评论

暂无评论...
验证码 换一张
取 消