Reputation: 92601
Is there any way that i can cause mysql to be case sensitive whe searching using where x like '%No.%';
Upvotes: 3
Views: 140
Reputation: 55449
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.
Upvotes: 3
Reputation: 2411
Try this:
SELECT * FROM <table> WHERE <column> COLLATE latin1_bin LIKE '%No.%'
Upvotes: 4