常见问题

常见问题解答:在 ArcGIS Pro 中,为什么该字段设置为空白,而非 null 值?

Last Published: August 16, 2024

在 ArcGIS Pro 的属性表中删除字段的值并按 Enter 键后,该值将显示为 <Null> 或空白。 虽然两个结果均指示空值,但两个返回值存在差异。 Null 值表示没有任何数据的字段,而空白字段以没有任何字符的字符串形式存在。 以下提供了进一步的解释,以演示为什么该字段设置为空白或 null。

空值

属性表包含 Number of Siblings 列和 2 个 null 值。

当数据类型设置为数值或者启用允许 NULL 复选框时,字段可以具有 null 值。 对于文本字段,可以存在非空的空白数据,例如空格。 然而,对于数值字段,不可能存在非空的空值,因为所有空值都被视为空值。 例如,在属性表中,当删除 Number of Siblings 字段中的值后,该字段将设置为 <Null>,而非空白,表明该值不存在。

当在属性表中创建字段时,要允许字段中的 null 值,请将数据类型设置为数值数据类型或者选中允许 NULL 复选框。 有关说明,请参阅 ArcGIS Pro:创建和管理字段或者操作方法:在 ArcGIS Pro 中为字段分配 null 值

Note: 
In some instances, due to BUG-000145688, a field is set to blank even when the Allow NULL check box is enabled and the data type is set to numeric. In this case, upgrade ArcGIS Pro to the latest version.

空白字段

属性表包含 Address 列和 2 个空白字段。

当数据类型设置为文本或者禁用允许 NULL 复选框时,字段可以空白。 例如,当用户不透露其地址并移除字段值后,该字段将设置为空白,而非 <Null>

当在属性表中创建字段时,要允许空白字段,请禁用允许 NULL 复选框或者将数据类型设置为文本。 有关说明,请参阅 ArcGIS Pro:创建和管理字段

Note: 
Not all geodatabase types support blank fields. For example, in an Oracle geodatabase, it is not possible to have a blank field as a string with no characters in the attribute table as the strings are automatically converted to null values.

文章 ID: 000029046

接收通知并查找新问题或常见问题的解决方案

从我们全新的 AI 聊天机器人中获得简明答案和视频解决方案。

下载 Esri 支持应用程序

获取来自 ArcGIS 专家的帮助

联系技术支持部门

下载 Esri 支持应用程序

转至下载选项