I have a stored procedure th开发者_如何学JAVAat returns a single recordset. is it possible to convert it into xml like below
<employee>
    <firstname>x</name>
    <lastname>x</name>
    <dob>x</dob>
</employee>
using some simple options in sql 2000?
SELECT *
FROM MyTable
WHERE 1 = 1
FOR XML AUTO
Instead of the AUTO, you can use RAW, EXPLICIT or PATH (see here http://msdn.microsoft.com/en-us/library/ms178107(v=SQL.90).aspx), but AUTO generally does what you want.
I can only find notes on MSDN for SQL 2008 and 2005 but I'm sure I've used this on 2000 before...
Thanks Skrealin
the query below works
select * from Mytable employee for xml auto , elements
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论