Usage of null in SQL server

In SQL we often use null values,

那么什么是NULL?如下是MSDN给出的一段简短描述(见“Null Values”):
•A value of NULL indicates that the value is unknown. A value of NULL is different from an empty or zero value. No two null values are equal. Comparisons between two null values, or between a NULL and any other value, return unknown because the value of each NULL is unknown.

That is to say, null refers to unknown, which is not related to null and 0, and 2 nulls are not equal, that is, null cannot be used for comparison operations, so "field = null" and "field <> cannot appear in SQL conditions. null" is written.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324946847&siteId=291194637