Generate Elements for NULL Values with the XSINIL Parameter
The directive constructs XML in which each column value maps to an element in the XML. By d
The
directive constructs XML in which each column value maps to an element in the
XML. By default, if the column value is NULL, no element is added. But by specifying the
optional
parameter on the ELEMENTS directive, you can request that an element is
created for the NULL value. In this case, an element that has the
attribute set to TRUE is
returned for each NULL column value.
Use RAW Mode with FOR XML
SELECT - FOR clause