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 the difference between count(*) and count(1) ?

0 Answers   MCN Solutions,


How do I find the size of a sql server database?

0 Answers  


What do you mean by an execution plan? Why is it used?

0 Answers  


How can you check the level of fragmentation on a table?

0 Answers  


Every night you run a full backup after every 3 three hours you make a differential backup every hour you make an incremental backup in a worst-case scenario, how much work you can lose?

0 Answers  






you have separate development and production systems you want to move a copy of a development database into production to do this, you do a backup on the development system and restore to the production system after a few minutes, you begin getting calls from several customers saying that they are denied access to the system why? : Sql server administration

0 Answers  


What is use of @@ spid in sql server?

0 Answers  


What is the use of commit?

0 Answers  


How to truncate a table first before running a package?

1 Answers  


Well sometimes sp_reanmedb may not work you know because if some one is using the db it will not accept this command so what do you think you can do in such cases?

2 Answers  


What are a scheduled jobs or what is a scheduled tasks?

0 Answers  


What is xdr?

0 Answers  


Categories