good day.. just want to ask, is it possible to alter a column table and make the default value to empty string..
i tried using this query,
Alter Table Employee Alter Column sJobTitle Varchar(200) DEFAULT ''
Unfortunately, it doesn't work..
Please let me know, if 'm doing it correct..
Thanks,
Link
You need to add a contraint. Referring to http://blog.sqlauthority.com/2008/05/31/sql-server-create-default-constraint-over-table-column/
ALTER TABLE Employee
ADD CONSTRAINT DF_Employee _JobTitle
DEFAULT '' FOR sJobTitle
try this query. this query does not change current datas to default.
ALTER TABLE Employee
ADD DEFAULT ('') FOR sJobTitle
maybe it work.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With