@@IDENTITY will return the last id that was created using your connection, therefore if your insert kicks off a trigger you could get the wrong id.
But SCOPE_INDENTITY() will return the last identity created
Category: SQL Server by flexicoder
Name (required)
Mail (will not be published) (required)
Website
.Net code .Net security Core Data Image iOS4 iPad iPhone Mac OS null OpenGL query syntax software web design WWDC10 XML XSL/T
WP Cumulus Flash tag cloud by Roy Tanck and Luke Morton requires Flash Player 9 or better.