tags:

views:

36

answers:

4

Can anyone tell me if a SELECT command to mysql is case insensitive by default? and if not, what command would i have to send so that i can do something like:

SELECT * FROM `table` WHERE `Value` = "DickSavagewood"

where in actuality, the real value of `Value` is dicksavagewood

A: 

SQL Select is not case sensitive.

This link can show you how to make is case sensitive: http://sqlserver2000.databases.aspfaq.com/how-can-i-make-my-sql-queries-case-sensitive.html

Jacob Nelson
A: 

They are case insensitive, unless you do a binary comparison

Marc B
+3  A: 

You can lowercase the value and the passed parameter :

SELECT * FROM `table` WHERE LOWER(`Value`) = LOWER("DickSavagewood")

Another (better) way would be to use the COLLATE operator as said in the documentation

Colin Hebert
A: 

The collation you pick sets whether you are case sensitive or not.

chuck taylor