Msg 2705, Level 16, State 3, Line 1
Column names in each table must be unique. Column name ‘%.*ls’ in table ‘%.*ls’ is specified more than once.
This error message appears when you try to specify a name for a column more than once upon creation of a table.
The T-SQL statement can be parsed, but causes the error at runtime.
Error of the Severity Level 16 are generated by the user and can be fixed by the SQL Server user. The statement cannot be executed this way. Columns names within a table must be unique.
All versions of SQL Server
IF OBJECT_ID(‘tempdb..#t’) > 0
DROP TABLE #t
CREATE TABLE #t
CONSTRAINT PK_t PRIMARY KEY,
In the above example we try to use the name ID for more than one column in the same table. This raises the error.