Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 rowguidcol

Author  Topic 

shapper
Constraint Violating Yak Guru

450 Posts

Posted - 2008-02-07 : 10:18:58
Hello,

I am creating a few "standard tables":

create table dbo.Tags

(
TagID uniqueidentifier ROWGUIDCOL not null
default NewID()
constraint PK_Tag primary key clustered,
[Text] nvarchar(100) not null
)

And "multi relationship" tables:

create table dbo.FilesTags
(
FileID uniqueidentifier not null,
TagID uniqueidentifier not null,
constraint PK_FilesTags
primary key clustered (FileID, TagID),
constraint FK_FilesTags_Files
foreign key(FileID)
references dbo.Files(FileID)
on delete cascade,
constraint FK_FilesTags_Tags
foreign key(TagID)
references dbo.Tags(TagID)
)


When should I use rowguidcol? And why?

Thanks,
Miguel

jdaman
Constraint Violating Yak Guru

354 Posts

Posted - 2008-02-07 : 10:34:15
http://www.mydatabasesupport.com/forums/ms-sqlserver/348987-what-purpose-rowguidcol-property.html
Go to Top of Page
   

- Advertisement -