Hi,
I have a table where I added a default in SSMS. So the default has a constraint name (e.g. 'DF_table_name_col_name')
Now I wanted to drop this default constraint and create a new one; in code. Dropping it seems to be easy. But when I try to create the new default constraint in code I get error. Here is syntax I use:
alter table table_name alter column col_name char(20) not null add constraint [DF_table_name_col_name] default ('')
What is wrong with my syntax above? TIA.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham