uniqueidentifier column

Tech-Archive recommends: Speed Up your PC by fixing your registry

From: Knick (anonymous_at_discussions.microsoft.com)
Date: 07/14/04


Date: Tue, 13 Jul 2004 21:45:33 -0700

I don't think that you can use identity on
UniqueIdentifier. It must use newid() only.
>-----Original Message-----
>I'm using a uniqueidentifier column as the "identity"
primary key column for
>a table.
>How can I retrieve the value of that column after an
insert (using NEWID())?
>I tried something like:
>"INSERT INTO TABLE........... SELECT @@Identity"
>The @@Identity does not work in this case. It returns
NULL
>
>Thanks,
>Fernando Chilvarguer
>
>
>.
>



Relevant Pages