Extract data from a BLOB field in Mysql

Asked

Viewed 2,380 times

3

I have a select where there is a column where this 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 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

1 answer

5


Use the CAST for CHAR, as follows:

SELECT CAST(user_data AS CHAR(1000) CHARACTER SET utf8) FROM user WHERE user_id=1
  • Thanks. It worked out.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.