On 10/15/06, Timothy Wu <[EMAIL PROTECTED]> wrote:

Hi,


hi

My MySQL on Debian is on version "4.0.24_Debian-10sarge1-log". I have a
varchar(255) as a primary key for a table. I have found the primary key
case
insensitive. Is this normal?


Yes, it's normal!
To force mysql to use case-sensitive matching you should use BINARY in your
comparison as follows:

SELECT BINARY 'abc'='AbC' ; <- returns false
SELECT 'abc'='AbC' ; <- returns true

or you could even declare your field as binary!

For more info:
http://dev.mysql.com/doc/refman/5.0/en/charset-binary-op.html

This is not the behavior I prefer. Any help
would be appreciated, thanks.

Timothy




--
http://www.openwebspider.org
http://www.eviltime.com

-

" Time is what we want most, but what we use worst "

Reply via email to