1.通过sql直接转换

select CONVERT(GROUP_CONCAT(XXX) USING utf8 from usertable;

2.通过程序转换(注:本例用的是springmvc包装并返回结果集)

String srt2;
   try {
         srt2 = new String((byte[])entry.getValue(),"UTF-8");
          hashmap.put(entry.getKey().toString(), srt2);
    } catch (UnsupportedEncodingException e) {
    e.printStackTrace();
   }

mysql BLOB字段转String的方法

相关文章:

  • 2021-05-31
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-10
  • 2021-10-10
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2019-11-22
  • 2022-01-03
相关资源
相似解决方案