如何查看sql二进制数据字段的内容? [英] How can I view the contents of sql binary data fields?

查看:1124
本文介绍了如何查看sql二进制数据字段的内容?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人知道如何查看MS SQL Server 2005数据库中包含二进制数据的字段的内容吗?

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

推荐答案

取决于是否只是以二进制形式存储的文本,如果可以的话,请看一下

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

输出 0x61626364656667 abcdefg

output 0x61626364656667 abcdefg

这篇关于如何查看sql二进制数据字段的内容?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆