how to generate XML out of QUERY?



how to generate XML out of QUERY?..

Answer / 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

More SQL Server Interview Questions

What is an entity-relationship diagram (erd)?

0 Answers  


Does sql server 2000 full-text search support clustering?

0 Answers  


What is the difference between views and stored procedures? Can we have input parameters for views?

6 Answers  


What are the differences between user defined functions and stored procedures?

0 Answers  


Can foreign key be deleted?

0 Answers  






What is the process of indexing?

0 Answers  


What is the command used to check locks in microsoft sql server?

0 Answers  


Let us say the SQL Server crashed and you are rebuilding the databases including the master database what procedure to you follow?

2 Answers  


How to change a login name in ms sql server?

0 Answers  


Hi all, I need query help for below senorio, could you please help me. TableName = City CITYID ContinuationID CITYNAME 1 1 SAN 1 2 DIEGO 2 1 SAN 2 2 FRANCISCO 3 1 CHICAGO 4 1 NEW 4 2 YORK 4 3 CITY Could you please help me to write a generalized SQL that returns results as given below in the Query result CITYID NAME1 NAME2 NAME3 NAME4 NAME5 1 SAN DIEGO 2 SAN FRANCISCO 3 CHICAGO 4 NEW YORK CITY

5 Answers   TCS,


What is data integrity? Explain constraints?

1 Answers   Thinksoft,


How to view existing indexes on an given table using sp_help?

0 Answers  


Categories