I want to add a new Column to an existing Table that has already Data in it. The Column should be NOT NULL. Because of that i want to set a Default Value. But when i do it throws the following exception: "Incorrect syntax near 'for'"
ALTER TABLE Semester ADD SIDNew uniqueidentifier NOT NULL
CONSTRAINT DF_SIDNew DEFAULT '00000000-0000-0000-0000-000000000000' FOR SIDNew
I already had a look at How to set a default value for an existing column and Incorrect syntax near the keyword 'FOR' but none of them helped me.