Nimble Fungus Nimble Fungus - 10 months ago 26
SQL Question

What is the meaning of FOR XML PATH(' ')?

Whats is the meaning of


What does it represent. As there is no root node to it.


From MSDN:

If you specify a zero-length string, the wrapping element is not produced.

(' ' fails, so I assume you meant an empty string, not a single space).

This has nothing to do with root elements, that's what root is for. This is only about the wrapping element.