By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,732 Members | 860 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,732 IT Pros & Developers. It's quick & easy.

are string matches in MySql normally case insenstive?

P: n/a
If I make this query with MySql:

SELECT * WHERE keyword='urbanism'

is the comparison case insensitive? Will MySql return all rows where
keyword equals both 'urbanism' and 'Urbanism'?

I searched this using Google Groups, and was suprised that there were
no entries on this. This seems almost FAQ material.

Jul 17 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
lk******@geocities.com wrote:
: If I make this query with MySql:

: SELECT * WHERE keyword='urbanism'

: is the comparison case insensitive? Will MySql return all rows where
: keyword equals both 'urbanism' and 'Urbanism'?

: I searched this using Google Groups, and was suprised that there were
: no entries on this. This seems almost FAQ material.
A better place than google groups is in the mysql manual.

The section called "Comparison Operators" says that "...By default, string
comparisons are not case sensitive...". A quick test at the mysql> prompt
shows that that is indeed the case.

I have not checked how one turns off the default to make the comparison
case sensitive.

--

This space not for rent.
Jul 17 '05 #2

P: n/a
lk******@geocities.com wrote:
If I make this query with MySql:

SELECT * WHERE keyword='urbanism'

is the comparison case insensitive? Will MySql return all rows where
keyword equals both 'urbanism' and 'Urbanism'?

I searched this using Google Groups, and was suprised that there were
no entries on this. This seems almost FAQ material.


Text columns are case insensitive. If you want case sensitivity, you
need to make the column BINARY. It's in the manual - if you know what
you're looking for.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================
Jul 17 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.