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

后端 未结 1 510
你的背包
你的背包 2021-01-07 23:37

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

相关标签:
1条回答
  • 2021-01-08 00:20

    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

    0 讨论(0)
提交回复
热议问题