The FOR XML clause is valid only in the SELECT statement and is subject to these limitations: FOR XML is not valid in subselections, whether it is in UPDATE, INSERT, or DELETE statements, a nested SELECT statement, or other statements (SELECT INTO, assignment).
Read More - Register for Free Membership