By default sql server assigns boolean fields a NULL value.
How can I tell it to use '0' as default?
I tried setting the default value to ((0)) but it still persists on the NULL.
By default sql server assigns boolean fields a NULL value.
How can I tell it to use '0' as default?
I tried setting the default value to ((0)) but it still persists on the NULL.
Please add suffix WITH VALUES, like the following. It works well:
ALTER TABLE (your table)
ADD (your column) [bit] NULL DEFAULT 1 WITH VALUES;