3

Possible Duplicate:
Get last inserted UNIQUEIDENTIFIER in SQL Server 2000

Here is my table schema

CustomersID     uniqueidentifier    (newid())
CompanyName     nvarchar(50)
RegistrantName  nvarchar(50)
AddressLine1    nvarchar(50)
AddressLine2    nvarchar(50)
City            nvarchar(50)
State           nvarchar(50)
Country         nvarchar(50)
Zip             nvarchar(20)
PhoneNo         nvarchar(50)
MobileNo        nvarchar(20)
FaxNo           nvarchar(20)
Website         nvarchar(250)
Email           nvarchar(250)

As I'm not using any identity field in my table I cannot use the SCOPE_IDENTITY() to get the last inserted record id. I need to get the CustomersID after inserting the record. How is it possible?

Community
  • 1
  • 1
Krishanu Dey
  • 6,326
  • 7
  • 51
  • 69

0 Answers0