9.1.7 NULL Values

The NULL value means no data. NULL can be written in any lettercase.NULL值表示“没有数据”。NULL可以用任何大小写。

Be aware that the NULL value is different from values such as 0 for numeric types or the empty string for string types. For more information, see Section B.3.4.3, “Problems with NULL Values”.请注意,NULL值与数值类型的0或字符串类型的空字符串等值不同。有关更多信息,请参阅第B.3.4.3节,“NULL值的问题”

For text file import or export operations performed with LOAD DATA or SELECT ... INTO OUTFILE, NULL is represented by the \N sequence. See Section 13.2.7, “LOAD DATA Statement”.对于使用LOAD DATASELECT ... INTO OUTFILE执行的文本文件导入或导出操作,NULL\N序列表示。参见第13.2.7节,“LOAD DATA语句”

For sorting with ORDER BY, NULL values sort before other values for ascending sorts, after other values for descending sorts.对于ORDER BY排序,NULL值在其他值之前进行升序排序,在其他值之后进行降序排序。