How can we read a table data in xml Format in SQL Server?
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Amit MohantyRank #112 · 20K reputationPosted Jun 23, 2023, 5:51 AM EDT
SELECT * FROM YourTableName FOR XML AUTO, ROOT('Root')Mayooran NavamanyRank #438 · 5.7K reputationPosted Jun 23, 2023, 6:01 AM EDT
Read this Article it is useful for you
https://www.sqlshack.com/working-with-xml-data-in-sql-server/