top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration Why to Join

Facebook Login
Site Registration

How to return XML in SQL Server?

+6 votes
How to return XML in SQL Server?
posted Nov 18, 2013 by Atul Mishra

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

+5 votes

You can do this by following SQL command

Select * from Table for xml Raw

It will give you data in XML format. By different options you can create your root elements as well.

answer Nov 20, 2013 by Neeraj Pandey
Contact Us
+91 9880187415
#280, 3rd floor, 5th Main
6th Sector, HSR Layout
Karnataka INDIA.