SQL Server’s error “Violation of … constraint ‘…’. Cannot insert duplicate key in object ‘…’” can appear when a user tries to insert a non-unique value into a table’s unique column such as the primary key. Look at the following syntax:
CREATE TABLE Table_1 (ID INT NOT NULL PRIMARY KEY, NAME VARCHAR(10) NOT NULL, AGE date);