Really... Wow there so much that I need to learn about SQL server.  I have always retrieved identity by wrapping an insert with a transaction and then selecting the max ID ie SELECT MAX(Identity) AS MaxID in another query.
 
How do you effectivily use the @@Identity property?
 
Thanks,
 
Jordan

"Schreck, Tom" <[EMAIL PROTECTED]> wrote:

Is there a way to query what the next sequence number will be?  In SQL Server, you can use @@Identity to retrieve the newly inserted record�s identity value.  In ORACLE, they use sequences.  I need to know the value of the sequence so I can return it after inserting a record.

 

 

Thanks

 

Tom Schreck

Applications Developer

Dresser, Inc.

15455 Dallas Parkway, Suite 1100

Addison, TX  75001-4690

972-361-9943

[EMAIL PROTECTED]

 

 

 

 



 

<<image/jpeg>>

Reply via email to