Mysql case sensitive where exactly

0.6K views
no comments
4 Jul 2014 12:00 am

in #MySQL cannot do it with any compression operator to check case sensitive value in column, so first convert your value into hash and compare with column value see code example how to do it.

Here is example of table

case_sensitive_col_id case_sensitive_col_val
1 SDTUTS.com
2 SDTuts.com
3 Sdtuts.com

Using SHA1 for casesensitive

SELECT * FROM tbl_name WHERE SHA1(case_sensitive_col) = SHA1('SDTuts.com')
ROWS RESULT =1

Using normal compression operator

SELECT * FROM tbl_name WHERE case_sensitive_col = 'SDTuts.com'
ROWS RESULT =3

NOTE:Your Email Address will be not shown and please do not add spamming comments because here is REL="NOFOLLOW" on your links and comments also moderated shown.
<code>Put html css or any language code under this tag</code>