Mysql search 'no' no no. ' or not";

Is there a way I can make mysql be case sensitive using a search where x likes "% #%";

+3
source share
3 answers

Try the following:

SELECT * FROM <table> WHERE <column> COLLATE latin1_bin LIKE '%No.%'
+4
source

You can change the type of column:

create table my_table (case_sensitive_column VARCHAR(10)) CHARACTER SET latin1 COLLATE latin1_bin;

EDIT In fact, jwsample's answer is better, because you do not need to modify the table.

+3
source

Source: https://habr.com/ru/post/1758107/


All Articles