How to return XML in SQL Server? - Online Free Computer Tutorials.

'Software Development, Games Development, Mobile Development, iOS Development, Android Development, Window Phone Development. Dot Net, Window Services,WCF Services, Web Services, MVC, MySQL, SQL Server and Oracle Tutorials, Articles and their Resources

Saturday, April 14, 2012

How to return XML in SQL Server?

How to return XML in SQL Server?

We can use FOR XML statement at the end of the query to return xml data from the SQL Server. 

select * from mytable for xml auto

There are three mode of returning XML and they are auto, raw and explicit 

No comments:

Post a Comment