>HI all
>
>Is the a @@identity or SCOPE_IDENTITY() that will work when using uniqueidentifier and newid() for my pk. I would like to get back the new PK when a row is inserted.
>
>Thanks.
No. There are two ways to get this info.
1. Set the ID yourself using NewID() and pass it to INSERT command
2. Using OUTPUT clause of INSERT command (SQL Server 2005 and up only). See details in BOL.
If it's not broken, fix it until it is.
My Blog