In MySQL (5.1) I am able to create a Index on a field that is type UNIQUE. This ensures that the field contains only unique items.
Is there something equivalent to that feature in SQL Server 2008?
An example of MySQL Table CREATE syntax with UNIQUE Index:
CREATE TABLE `routelist` (
`RouteID` INT(11) NOT NULL AUTO_INCREMENT,
`RouteName` VARCHAR(20) NOT NULL,
`Active` TINYINT(4) NOT NULL DEFAULT '1',
PRIMARY KEY (`RouteID`),
UNIQUE INDEX `RouteName` (`RouteName`)
)
COMMENT='3.29.2012'
COLLATE='latin1_swedish_ci'
ENGINE=InnoDB
AUTO_INCREMENT=8;