how to generate XML out of QUERY?

Answer Posted / mahendra raja

select * from [table name] for xml auto (or)
select * from [table name] for xml raw

But if there is any binary field column in table then this
query wont work.

Is This Answer Correct ?    9 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the database roles? : sql server security

555


How is sql server used?

544


Can two tables have the same primary key?

559


do you know how to configure db2 side of the application? : Sql server database administration

592


What are the different types of upgrades that can be performed in sql server?

685






Thanks to some maintenance being done, the sql server on a failover cluster needs to be brought down. How do you bring the sql server down?

522


What is the use of partition by in sql server?

507


What is triggers in ms sql server?

638


What is a user-defined function in the sql server and what is its advantage?

613


Is candidate a key?

529


Are semicolons required at the end of sql statements in sql server 2005?

565


What is an indexed view?

579


Explain the usage of floor function in sql server.

498


What are cascading parameters in ssrs reports?

176


Write an sql query to sort a table according to the amounts in a row and find the second largest amount.

558