Rows case-sensitive possibly as a setting?!

Curanai posted 4 years ago in General
Hell had opened its' gate and showed a problem of the real world ... maybe a minified one, but I have a real conflict with this.

Table-rows aren't case-sensitive - I can query "stationen" as "Stationen" (or similar); and of course I was wondering about the problems online.

I have not found any possibility to set up HeidiSQL to be a real nanny-goat. Is it hidden within some ini-files or is there another way to get a warning about this kind of "typing error"?!

Thank you very much.
ansgar posted 4 years ago
Case sensitivity is a matter of collation and data type in MySQL, it's not a HeidiSQL setting. A column marked as binary or with some of the LONGBLOB/MEDIUMBLOB/TINYBLOB/etc. data types is always case sensitive, while the TEXT/MEDIUMTEXT/etc. data types are normally case insensitive, unless you apply for example a collation like "utf8_bin" to such a TEXT column.

Now, if you say: My contents in table x, column y always need to act case sensitively, you should go and turn its data type to BLOB/LONGBLOB/etc.

If you want case sensitiveness in only one or more specific queries, you can also do it like HeidiSQL's Search > "Search text on server" dialog does it. In that case, just add the "BINARY" prefix to the string literal you are passing into the string:
WHERE `column` LIKE BINARY '%obelix%'

Please login to leave a reply, or register at first.