Why not to use @@identity in TSQL?
Travis Laborde [http://weblogs.sqlteam.com/travisl/] has a great tip on why not to use @@identity [http://weblogs.sqlteam.com/travisl/posts/405.aspx] in TSQL code and use scope_identity() [http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_sa-ses_6n8p.asp] instead. BTW, the…