Please start any new threads on our new site at We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Register Now and get your question answered!
Save Password
Forgot your Password?

 All Forums
 Site Related Forums
 Article Discussion
 Article: Global Variables
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Ask SQLTeam Question

0 Posts

Posted - 08/08/2000 :  05:23:59  Show Profile  Visit AskSQLTeam's Homepage  Reply with Quote
girish writes "What are @@rowcount and @@identity used for?"

Article Link.

Starting Member

0 Posts

Posted - 09/11/2000 :  08:39:25  Show Profile  Reply with Quote
The @@identity

In SQL, I see how to use this @@identity, but is there any way this variable is attainable through an ODBC connection, like when using ASP? It'd be wonderful to just touch this variable, instead of having to close and open another recordset to find out the ID of what I just inserted.

Go to Top of Page

Starting Member

0 Posts

Posted - 01/08/2001 :  12:44:18  Show Profile  Reply with Quote
what about triggers?

what if insert statement causes a trigger to fire, which in turns inserts another record into a different table.
What will @@identity return?
From my experience it will return id from the last table inserted.

This approach is fine if there are no triggers on the table which insert any data.


Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.04 seconds. Powered By: Snitz Forums 2000