请问如何取得正在添加的id号呀?我想让parenid等于当前正在添加的纪录的id号如何写呀?

如题
---------------------------------------------------------------

declare @id int
@id=@@identity
---------------------------------------------------------------

select max(id)+1 from table

Published At
Categories with Web编程
comments powered by Disqus