1
It is possible to set default value for column of an existing table?
I am trying this way, but always the column is null instead of the default value that was reported.
IF NOT EXISTS (SELECT * FROM SYSCOLUMNS C INNER JOIN SYSOBJECTS T ON C.id = T.id WHERE C.name = ('IsPreparacao') AND T.name = 'Cadastro')
BEGIN
ALTER TABLE Cadastro
ADD IsPreparacao bit default 0
END
I’ve searched the net and I haven’t found anything that helps me as my problem, someone can help me with this question?
Thank you so much that you can help me.
Thanks for the help, get to solve the problem.
– krispim