hi,
    i have some questions on @@IDENTITY. it is possible that another insert
could have taken place between the first insert and the select @@identity
statement. is there a way to prevent this, maybe locking ???

but since @@identity it is a global variable, what about another insert in
another table. would this cause a problem?

thanks
----- Original Message -----
From: Dave Watts <[EMAIL PROTECTED]>
Subject: RE: Avoiding using the MAX function


> CREATE PROC insItem
>
> @Item_Name varchar(30),
> @Item_Desc varchar(255)
>
> AS
>
> INSERT INTO Item
> (Item_Name,
> Item_Desc)
> VALUES
> (@Item_Name,
> @Item_Desc)
> SELECT ID = @@IDENTITY
>
> You could then reference the ID field in the resulting recordset.


------------------------------------------------------------------------------
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to