You can add the unique
keyword:
CREATE TABLE [dbo].[Cities]
(
[CityID] INT NOT NULL PRIMARY KEY,
[Name] NCHAR(100) NULL UNIQUE
);
There are alternative methods. You can add also add a unique
index:
create unique index cities_name on dbo.Cities(Name);
Or do it with a unique
constraint:
CREATE TABLE [dbo].[Cities]
(
[CityID] INT NOT NULL PRIMARY KEY,
[Name] NCHAR(100) NULL,
constraint unique_name unique(Name)
);