Microsoft SQL Server Primary Keys Create table w/ natural key

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Extensions
> Step 2: And Like the video. BONUS: You can also share it!

Example

 -- natural primary key - using an existing piece of data within the table that uniquely identifies the record
 create table person (
 firstName varchar(100) not null,
 lastName varchar(100) not null,
 dob DateTime not null,
 ssn varchar(9) primary key not null
 )


Got any Microsoft SQL Server Question?