roy himanshu

roy himanshu

  • NA
  • 126
  • 0

How to generate same uniqueidentifier for two deffrent tables?

Aug 29 2009 1:42 AM

Hi,
How to generate same uniqueidentifier for two deffrent tables?is it possible?it is primary key column.i paste my syntax here.plz give me correct syntax.plz.
CREATE
TABLE Persons
(

ID
UNIQUEIDENTIFIER DEFAULT NEWID() PRIMARY KEY,
lastname
varchar(10) not null,
firstname
varchar(10),
)

GO

insert
into Persons values(newid(),'ravi','kumar')

Answers (1)