Is NULL in table fields better than empty fields?

I wonder if it is necessary to have NULL in fields without a value or should it be empty?

what's better?

thank

+3
source share
5 answers

There is a specific argument that you should never allow NULL in your data if you use it to indicate that you do not know what value should be or you simply do not have data, but then use an explicit value in the field to indicate these conditions. Similarly for "empty" fields. However, I think everyone is doing it or has done it and can do it again. NULL has odd comparative properties, so it is always better, if possible, to avoid this and have explicit values ​​for missing data states.

+1
source

NULL means no data is given, and an empty string may be some valid data.

Thus, using NULL helps you differentiate these two cases.

+7

. , NULL. , , . , - , NULL .

+2

NULL , , , , . , . , , , .

NULLS , , NULLS. NULLS , , "" ( (FIELD)), .

NULL , NULL. , NULL . Autonumber.

Oracle 1980- , VARCHAR ( ) NULL. " ". .

NULL . , .

+1

. , null . unknon , , . , . 0 - , null, . , , null , , . .

, .

0
source

Source: https://habr.com/ru/post/1743153/


All Articles