Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SQL Server 2000 - Default Value for varchar fields

I have a sql server nvarchar field with a "Default Value or Binding" of empty string. It also happens to be a not null field.

Does this mean that there is no default or that it is a default of a string with no characters in it.

If I don't insert a value, will it insert with an empty string or fail with a "not null" error?

like image 223
GordyII Avatar asked Feb 28 '23 10:02

GordyII


1 Answers

The default is a blank (empty) string.

If you don't provide a value, the insert will be successful and the value will be blank, not null.

like image 54
Noon Silk Avatar answered Mar 12 '23 17:03

Noon Silk