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

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

AskSQLTeam
Ask SQLTeam Question

USA
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.

Anonymous
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

Anonymous
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.

Mikhail
mikeg@vuepoint.com

Go to Top of Page
  Previous Topic Topic Next Topic  
 New 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.08 seconds. Powered By: Snitz Forums 2000