XML RAW
SELECT * FROM Sales.Customer A
INNER JOIN Sales.MyOrders B ON A.CustomerID = B.customerId
FOR XML RAW
SELECT * FROM Sales.Customer A
INNER JOIN Sales.MyOrders B ON A.CustomerID = B.customerId
FOR XML RAW
<row CustomerID="100" StoreID="1252" TerritoryID="6" AccountNumber="AW00000100" rowguid="E789F6DD-3159-4DDC-81A8-8571C571656E" ModifiedDate="2008-10-13T11:15:07.263" orderid="1" customerId="100"/>
<row CustomerID="200" StoreID="1186" TerritoryID="1" AccountNumber="AW00000200" rowguid="7C96C878-A038-4B2F-825F-016C922D6407" ModifiedDate="2008-10-13T11:15:07.263" orderid="2" customerId="200"/>
<row CustomerID="200" StoreID="1186" TerritoryID="1" AccountNumber="AW00000200" rowguid="7C96C878-A038-4B2F-825F-016C922D6407" ModifiedDate="2008-10-13T11:15:07.263" orderid="3" customerId="200"/>
<row CustomerID="200" StoreID="1186" TerritoryID="1" AccountNumber="AW00000200" rowguid="7C96C878-A038-4B2F-825F-016C922D6407" ModifiedDate="2008-10-13T11:15:07.263" orderid="4" customerId="200"/>
XML AUTO
SELECT * FROM Sales.Customer A
INNER JOIN Sales.MyOrders B ON A.CustomerID = B.customerId
FOR XML AUTO
<A CustomerID="100" StoreID="1252" TerritoryID="6" AccountNumber="AW00000100" rowguid="E789F6DD-3159-4DDC-81A8-8571C571656E" ModifiedDate="2008-10-13T11:15:07.263">
<B orderid="1" customerId="100"/>
</A>
<A CustomerID="200" StoreID="1186" TerritoryID="1" AccountNumber="AW00000200" rowguid="7C96C878-A038-4B2F-825F-016C922D6407" ModifiedDate="2008-10-13T11:15:07.263">
<B orderid="2" customerId="200"/>
<B orderid="3" customerId="200"/>
<B orderid="4" customerId="200"/>
</A>
XML AUTO
SELECT * FROM Sales.Customer A
INNER JOIN Sales.MyOrders B ON A.CustomerID = B.customerId
FOR XML AUTO
<A CustomerID="100" StoreID="1252" TerritoryID="6" AccountNumber="AW00000100" rowguid="E789F6DD-3159-4DDC-81A8-8571C571656E" ModifiedDate="2008-10-13T11:15:07.263">
<B orderid="1" customerId="100"/>
</A>
<A CustomerID="200" StoreID="1186" TerritoryID="1" AccountNumber="AW00000200" rowguid="7C96C878-A038-4B2F-825F-016C922D6407" ModifiedDate="2008-10-13T11:15:07.263">
<B orderid="2" customerId="200"/>
<B orderid="3" customerId="200"/>
<B orderid="4" customerId="200"/>
</A>
XML AUTO, ELEMENTS
SELECT * FROM Sales.Customer A
INNER JOIN Sales.MyOrders B ON A.CustomerID = B.customerId
FOR XML RAW
--FOR XML AUTO
FOR XML AUTO,Elements
<A>
<CustomerID>100</CustomerID>
<StoreID>1252</StoreID>
<TerritoryID>6</TerritoryID>
<AccountNumber>AW00000100</AccountNumber>
<rowguid>E789F6DD-3159-4DDC-81A8-8571C571656E</rowguid>
<ModifiedDate>2008-10-13T11:15:07.263</ModifiedDate>
<B>
<orderid>1</orderid>
<customerId>100</customerId>
</B>
</A>
<A>
<CustomerID>200</CustomerID>
<StoreID>1186</StoreID>
<TerritoryID>1</TerritoryID>
<AccountNumber>AW00000200</AccountNumber>
<rowguid>7C96C878-A038-4B2F-825F-016C922D6407</rowguid>
<ModifiedDate>2008-10-13T11:15:07.263</ModifiedDate>
<B>
<orderid>2</orderid>
<customerId>200</customerId>
</B>
<B>
<orderid>3</orderid>
<customerId>200</customerId>
</B>
<B>
<orderid>4</orderid>
<customerId>200</customerId>
</B>
</A>