TSQL: One Row Per Element With FOR XML
问题 I have a SQL Server 2005 query that generates a large result set (up to several gigabytes): SELECT * FROM Product FOR XML PATH('Product') Running the query generates a single row containing a document with many product elements: Row 1: <Product> <Name>Product One</Name> <Price>10.00</Price> </Product> <Product> <Name>Product Two</Name> <Price>20.00</Price> </Product> ... I would like to change the query so that instead of a result set with one row containing a single document with multiple