Monday 5 April 2021

MSSQL - Fix Error - Column names in each table must be unique. Column name 'IsValid' in table 'Test1' is specified more than once.

 Watch this example on YouTube


To fix it replace

 Alter Table Test1
Add IsValid bit not null Default 0

with  


IF COL_LENGTH('dbo.Test1', 'IsValid') Is Null
Begin

Alter Table Test1
Add IsValid bit not null Default 0
End

No comments:

Post a Comment