Hi there,
Is there any way that i can cause mysql to be case sensitive whe searching using where x like '%No.%';
Hi there,
Is there any way that i can cause mysql to be case sensitive whe searching using where x like '%No.%';
You could change the column type:
create table my_table (case_sensitive_column VARCHAR(10)) CHARACTER SET latin1 COLLATE latin1_bin;
EDIT Actually, jwsample's answer is better because you don't have to modify the table.
http://sqlserver2000.databases.aspfaq.com/how-can-i-make-my-sql-queries-case-sensitive.html
http://aspadvice.com/blogs/ssmith/archive/2007/09/30/Case-Sensitive-or-Insensitive-SQL-Query.aspx
Try this:
SELECT * FROM <table> WHERE <column> COLLATE latin1_bin LIKE '%No.%'