当我编写查询以生成xml标记时,我想在我的sql查询中保留html标记.例如:
select '<p> this is a code</p>' as code
from table name
for xml path (''), type
Run Code Online (Sandbox Code Playgroud)
输出:
<code><p> this is a code </p> <code>
Run Code Online (Sandbox Code Playgroud)
它应该输出什么:
<code><p> this is a code </p><code>
Run Code Online (Sandbox Code Playgroud)
我该如何解决这个问题?谢谢!