NULL and an empty string are by the formal definition two quite different things.
For instance, take a column MiddleName in Persons table. If MiddleName is the empty string, we know that this person does not have a middle name. If the value is NULL, we don't know the middle name of this person might be, or if the person has a middle name at all.
As I said, this is the formal meaning of NULL. In practice, NULL has a semantic meaning which is defined by the context. NULL in column called PaidDate in an Invoice table probably means that the invoice has not yet been paid. NULL in a CustRespID column in a Customers table probably means that there is no employee has been assigned to be responsible for this customer. And for a MiddleName column, many prefer to use NULL to include that the person has no middle name.
And more generally for strings, in practice there is rarely any need to distinguish between the case "we don't know" and the "we know that there is no value", and NULL and empty strings tend be used quite interchangeably.
However, in formal definitions for a relational database, there still is a big difference between NULL and empty string. So while you may prefer to consider them as the same, you still need to keep the differences in mind when writing your code and defining your tables. And a constraint like the one Viorel suggested can serve that purpose. Note that since trailing blanks are not significant for =
and <>
, this constraint will also trap a value that consists of spaces only.