在SQL Server中创建XML时,如何在CDATA标记中包装值?

时间:2012-09-18 19:35:33

标签: sql sql-server sql-server-2008 tsql

如何在CDATA中包装OldValue?

SELECT
1 AS Tag,
0 AS Parent,
(
    SELECT PositionDescription AS 'data()'
     FROM dbo.Project where ID = 32
     FOR XML PATH('')
) AS 'PositionDescription!1!OldValue!CDATA'
FOR XML EXPLICIT, TYPE 

0 个答案:

没有答案