HOW can I assign the value of @.@.IDENTITY to the any variable in SQL SERVER .
Thanks,
DECLARE @.var int
INSERT INTO <table> VALUES <...> SELECT @.var= @.@.IDENTITY
On another note, I'd recommend using SCOPE_IDENTITY() instead of @.@.IDENTITY. check out books online for some info. ScopeIdentity is more accurate in returning the autonumber id.
No comments:
Post a Comment