> With SQL Server, for example, @@IDENTITY doesn't work exactly the > same as SCOPE_IDENTITY - if I recall correctly, one is > connection-specific while the other is not.
Both of them are connection specific, but scope_identity is specific to your current scope. For example, if an insert fires an insert trigger to update a different table, which also creates a new identity, scope_identity will return the ID from the parent insert, not the ID from the table insert trigger updated. @@identity will return the last identity created, even if it's from a different scope, which in the above example would be the identy from the insert trigger (probably not what was intended). ------------------------------------------------------------------------------ This transmission may contain information that is privileged, confidential and/or exempt from disclosure under applicable law. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, or use of the information contained herein (including any reliance thereon) is STRICTLY PROHIBITED. If you received this transmission in error, please immediately contact the sender and destroy the material in its entirety, whether in electronic or hard copy format. Thank you. ============================================================================== "EMF <idahopower.com>" made the previous annotations. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Create robust enterprise, web RIAs. Upgrade & integrate Adobe Coldfusion MX7 with Flex 2 http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:262812 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

