且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在MySQL中将BLOB转换为VARCHAR?

更新时间:2021-07-20 22:52:04

尝试使用它,我在一段时间前发现它,可以将其转换为char,而不是Varchar2Varchar,没有测试一下.试试:

try using this, I found it some time ago, you can convert it to char, not to Varchar2 or Varchar, haven't test it yet. Try:

CAST(a.ar_options AS CHAR(10000) CHARACTER SET utf8)

MySQL对待数据的唯一性.因此,Blob和Text之间存在差异.文本只是表示以原始形式存储的文本字符串,而不是以二进制形式存储,而blob是以二进制形式存储的文本字符串.

MySQL treat data unique. Hence there is a difference between Blob and Text. Text simply means a text string stored as original, not in binary, whereas a blob is a text string stored as a binary.