Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.
控制对使用 FOR XML 子句的查询中的 NULL 值的处理。
Empty、Omit
Omit
可以为单个连接或 PUBLIC 设置此选项。您必须具有 SET ANY PUBLIC OPTION 系统特权才能为 PUBLIC 或者其他用户或角色设置此选项。
执行包含 FOR XML 子句的查询时,for_xml_null_treatment 选项决定 NULL 值的处理方式。缺省情况下,结果中会忽略包含 NULL 值的元素和属性。将此选项设置为 Empty 会在值为 NULL 时生成空元素或属性。