Hello,I am creating a table with its constraints as follows:create table dbo.Profiles( Id int not null constraint Profiles_Id_PK primary key clustered (Id), Approved bit not null constraint Users_Approved_DF default (0), City nvarchar (200) null, Curriculum varbinary (max) filestream null, [Key] uniqueidentifier rowguidcol not null constraint Profiles_Key_U unique,) filestream_on [FILE]
I have a few questions: - Do I need to have "clustered (Id)" or can I have just "clustered"? - Can I move the constraints to the end of the script instead of having it in each field? I tried but I always get errors:create table dbo.Profiles( Id int not null Approved bit not null, City nvarchar (200) null, Curriculum varbinary (max) filestream null, [Key] uniqueidentifier rowguidcol not null, constraint Profiles_Id_PK primary key clustered (Id), constraint Profiles_Key_U unique (Key), constraint Users_Approved_DF default (0) for (Approved)) filestream_on [FILE]
Any suggestion is also welcome to improve my code.Thank You,Miguel