Skip to main content
April 22, 2009
Question

@@identity

  • April 22, 2009
  • 1 reply
  • 426 views

If an insert query fails somehow, what would @@identity return?

    This topic has been closed for replies.

    1 reply

    Inspiring
    April 22, 2009

    That is determined by sql server (not ColdFusion), so your best bet is to check their documentation on the subject.  However, for most purposes scope_identity() is preferred over @@identity.

    http://msdn.microsoft.com/en-us/library/ms187342.aspx