Transform table definition to XML select, it can be useful when we need to create many XML select or re-create it. Result: 1 2SELECT 3 [Message].value('(msg_Customers/Customers/CustomerID)[1]', 'nchar(5)') as [CustomerID] 4, [Message].value('(msg_Customers/Customers/CompanyName)[1]', 'nvarchar(40)') as [CompanyName] 5,...
We have a lot of articles about how to do but most of the time it is too much information. This article tries to answer 2 questions! How can we create XML column from a SQL query? How can we create a table from XML column? This example use NorthWind database: https://northwinddatabase.codeplex.com/releases/view/71634 1...