SQL Select - for xml

SQL Select statement

select UserName 
from employees 

for xml path(‘’)

appears to be a concatination mechanism, or a way to change the output to an XML block

select UserName 
from employees 
for xml path('')

Using SQL Server Management Studio, the above statement produces an xml dataset. Clicking this link brought up a window containing a list:

AgxxAm
AxxxaL
total of 40 of these records
ZarxxR
ZieccE

Blocking the columnname

select ','+UserName 
from employees 
for xml path('')

Produces the output of 1 xml packet named ‘xml_f5e2b61…’ output would resemble above
,AgxxxxxAm,AnxxxL,ZarxxxraR,ZiexxxnE