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
 General SQL Server Forums
 New to SQL Server Programming
 Unique Problem

Author  Topic 

shapper
Constraint Violating Yak Guru

450 Posts

Posted - 2010-10-16 : 19:34:29
Hello,

I am creating a the following table:

create table dbo.Profiles
(
Id int not null
constraint Profiles_Id_PK primary key clustered (Id),
Curriculum varbinary (max) filestream null
constraint Profiles_Curriculum_DF default (0x),
[Key] uniqueidentifier rowguidcol not null
constraint Profiles_Key_U unique
) filestream_on [STORAGE]

When I recreate the database using the new VS 2010 database projects I get an error on following code line:

[Key] uniqueidentifier rowguidcol not null
constraint Profiles_Key_U unique

But the problem disappears if I use:

[Key] uniqueidentifier rowguidcol not null unique

Aren't both code lines the same?

Thank You,

Miguel

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2010-10-16 : 23:39:18
Same answer as your other post.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page
   

- Advertisement -