如何在SQL Server 2005中获取最后插入的ID?

时间:2012-03-24 07:15:22

标签: sql-server

  

可能重复:
  How to Get Last Created Entry's ID From Sql Database With Asp.Net
  How to get last inserted id?

我很难在

中获取最后一个插入的字段
selct scope identity();

SELECT *
FROM Person
ORDER BY PersonID DESC
LIMIT 1

0 个答案:

没有答案