General information
Forum:
Microsoft SQL Server
Environment versions
SQL Server:
SQL Server 2000
ALTER TABLE dbo.MyTable WITH NOCHECK ADD
CONSTRAINT [ConstraintName] UNIQUE NONCLUSTERED
(Column1, Column2) ON [PRIMARY]
GO
Cheers,
Zoran
>Consider the following table structure:
>Id uniqueidentifier
>ControlId bigint
>Number tinyint
>field_0 varchar(10)
>field_1 varchar(10)
>.
>.
>field_n varchar(10)
>
>The Id field is my PK, but I would also like to add a unique constraint on the "combination" of the fields ControlId and Number. How can I do this? Please let me know if what I am asking is very unclear.
>
>Thanks,
>Einar
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only