Hi,
I am adding a constraint while modifying the dbtype.
ALTER TABLE Exams Alter Column WLUs float null
CONSTRAINT DF_Exams_WLUs DEFAULT (0) for WLUs
This gives an error saying "incorrect syntax near constraint"
So i wrote it as
ALTER TABLE Exams Alter Column WLUs float null
ALTER TABLE Exams add CONSTRAINT DF_Exams_WLUs DEFAULT (0) for WLUs
Then it worked but I want in the first pattern,I dont want to write "alter table exam" twice just to add constraint
Thanks for the help in advance
I am adding a constraint while modifying the dbtype.
ALTER TABLE Exams Alter Column WLUs float null
CONSTRAINT DF_Exams_WLUs DEFAULT (0) for WLUs
This gives an error saying "incorrect syntax near constraint"
So i wrote it as
ALTER TABLE Exams Alter Column WLUs float null
ALTER TABLE Exams add CONSTRAINT DF_Exams_WLUs DEFAULT (0) for WLUs
Then it worked but I want in the first pattern,I dont want to write "alter table exam" twice just to add constraint
Thanks for the help in advance