Knowledge Walls
John Peter
Pune, Maharashtra, India
How to convert upper and lower in mysql blob, binary and varbinary fields data?
5900 Views
Why it is not working! 
BINARY type of data's are not possible to convert upper and lower case. Need to convert binary string to normal string using CONVERT method of mysql. With the column value has to insert few normal text string convertion also like below.
Example
-- Normal abc
SELECT 'abc';

-- Binary abc
SELECT BINARY 'abc';

-- Converts to Normal string as ABC
SELECT UPPER('abc');

-- Not converts binary string to uppercase
SELECT UPPER(BINARY 'abc');

-- Converts binary abc to normal string abc
SELECT CONVERT(BINARY 'abc' USING latin1);

-- Now upper method Converts abc to Upper case ABC
SELECT UPPER(CONVERT(BINARY 'abc' USING latin1));
Output 
Best Lessons of "MySQL"
Top lessons which are viewed more times.
  Copyright © 2014 Knowledge walls, All rights reserved
KnowledgeWalls
keep your tutorials and learnings with KnowledgeWalls. Don't lose your learnings hereafter. Save and revise it whenever required.
Click here for more details