ryu's blog just a few lines of code

19Apr/110

MySQL: Convert BLOB inside Query

Example: s.data is a BLOB field.

SELECT CAST(s.data AS CHAR(10000) CHARACTER SET utf8) as blabla FROM sync_transport s LIMIT 0,1000

or

SELECT CONVERT(s.data USING utf8) as blabla FROM sync_transport s LIMIT 0,1000

Tagged as: , Leave a comment
Comments (0) Trackbacks (0)

No comments yet.


Leave a comment

(required)

No trackbacks yet.