Welcome to my blog, hope you enjoy reading
RSS

Monday 15 July 2013

case sensitive and insensitive condition in mysql

case sensitive and insensitive condition in mysql

In database normally we write the condition then bydefault it is caseinsensitive.
//case insensitive condition in mysql

SELECT * FROM myTable WHERE 'something' = 'Something'

= 1

//case sensitive condition in mysql

This is a select with binary

SELECT * FROM myTable WHERE BINARY 'something' = 'Something'

or

SELECT * FROM myTable WHERE 'something' = BINARY 'Something'= 0

0 comments: