varbinary to string on SQL Server

后端 未结 7 1099
时光说笑
时光说笑 2020-11-27 15:41

How to convert a column value from varbinary(max) to varchar in human-readable form?

7条回答
  •  [愿得一人]
    2020-11-27 16:22

    For a VARBINARY(MAX) column, I had to use NVARCHAR(MAX):

    cast(Content as nvarchar(max))
    

    Or

    CONVERT(NVARCHAR(MAX), Content, 0)
    VARCHAR(MAX) didn't show the entire value
    

提交回复
热议问题