Thursday, May 24, 2012

How to Convert SQL Table Data To XML Format in sqlserver

Here i will show how to get the xml output from sql data table.For this we can use FOR XML AUTO statement.The AUTO is one of mode of FOR XML.This sql statement get the emp table data ,then convert in to xml.This can be see in the black rectangle in below screen shot.
Query: select*from emp FOR XML auto

No comments:

Bel