Skip to content

Convert VARBINARY to Base64 in MySQL

This seems like a basic scenario, but I can’t find relevant info anywhere. I’m new to MySQL, coming from years of Microsoft SQL Server experience. In MySQL, how do you convert a BINARY or VARBINARY value into a Base64 string, and vice-versa? In Microsoft SQL Server, I’ve been using code like…

SELECT count based on columns value

I have a table like this Date | Name | StateData | ——+——-+———–+ xxxxx | Tom | OPENED | xxxxx | David | NULL | xxxxx | Tom | NULL | xxxxx | Brand | CLOSED | …

Select Distinct and show records where X column is not the same

I have a database with a structure of: I am struggling to write a query to show me where ‘Supp’ is different. (Supp Should be the same for all records, So i need to identify records effected to correct) The table contains more than 55,000 lines Just a list of Codes where Supp is not the same for e…