Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何在 xml 消息中存储 COLUMNS_UPDATED() 返回的值?我想稍后将它返回到 varbinary(max) 变量并执行一些操作。
将 varbinary 值添加到 XML 类型将其存储为 base64 编码,并且提取该值已经知道如何对其进行解码:
declare @v varbinary(1000) = 0x0102030405; declare @x xml; set @x = (select @v as value for xml path ('message'), type); select @x, @x.value(N'(/message/value)[1]', N'varbinary(1000)');