Extract data from a BLOB field in MySQL

3

I have a select where it has a column where it is returning me in <BLOB>

  

QUERY

SELECT * FROM user WHERE user_id=1
  

RETURN:

id  data_cad             user_data
12  2017-03-01 21:38:57    <Blob>
  

In the BLOB field it returns the following:

Msg=[Nome do operador João dos Passos]  IN=1 SECS=221

I need my query to return:

12  2017-03-01 21:38:57    Nome do operador João dos Passos
    
asked by anonymous 30.03.2017 / 23:49

1 answer

4

Use CAST to CHAR , as follows:

SELECT CAST(user_data AS CHAR(1000) CHARACTER SET utf8) FROM user WHERE user_id=1
    
31.03.2017 / 00:04