开发者

Determine length of SQL Server 2005 XML Data returned

Is there a way to predermine the leng开发者_如何转开发th of returned XML Data from SQL Server.

Ex:

SELECT *
FROM Products
FOR XML RAW, ROOT('products')

I am using SQL Server 2005.


SELECT DATALENGTH (
                    (SELECT *
                    FROM products
                    FOR XML RAW, ROOT('products')
                    ) 
                )

It will give to you size in bytes. for details, see here: http://msdn.microsoft.com/en-us/library/ms173486(v=SQL.90).aspx

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜