MySQL CONCAT(“string”,longtext) results in hex string

后端 未结 2 1939
轻奢々
轻奢々 2021-01-11 15:16

I\'m experiencing a weird hex string result when trying to concat a string with a column that should be of LONGTEXT type.

The query goes like this:

S         


        
2条回答
  •  一个人的身影
    2021-01-11 16:08

    Have you tried casting? Usually works pretty well for me. Example:

    SELECT CONCAT("abc",CAST(t.LONGTEXT_VALUE AS CHAR),"cde") FROM mytable t
    

提交回复
热议问题