How can I view the contents of sql binary data fields?

六眼飞鱼酱① 提交于 2020-06-22 13:32:20

问题


Does anybody know how to view the contents of fields containing binary data in an MS SQL Server 2005 database?


回答1:


Depends if it is just text stored as binary or not, if it is then take a look at this

create table #bla (col1 varbinary(400))

insert #bla values(convert(varbinary(400),'abcdefg'))

select col1,convert(varchar(max),col1)
from #bla

output 0x61626364656667 abcdefg



来源:https://stackoverflow.com/questions/532815/how-can-i-view-the-contents-of-sql-binary-data-fields

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!