2010-08-06 5 views

Répondre

0

Cela devrait le faire.

CREATE TABLE [dbo].[TestTable] 
(
    [id] [int] NOT NULL, 
    [otherValue] [int] NOT NULL, 
CONSTRAINT [IX_OtherValye] UNIQUE NONCLUSTERED 
(
    [otherValue] ASC 
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY] 
) ON [PRIMARY] 
0
CREATE TABLE [MyTable] 
(
    ID INT NOT NULL, 
    SomeUniqueColumn varchar(20) NOT NULL, 

    CONSTRAINT PK_MyTable PRIMARY KEY(ID), 
    CONSTRAINT U_MyTable UNIQUE(SomeUniqueColumn) 
) 
Questions connexes