Re: Collation Order in MySQL?

2007-04-10 Thread Paul DuBois

At 4:46 PM -0400 4/10/07, David T. Ashley wrote:

I'd like to have a table in MySQL with the key field being a 12-character
text string consisting of digits and upper-case letters (minus the vowels
and Y, to prevent accidental bad words), i.e. something like:

XM39C6B4...

When I do queries and get back result sets sorted on this text string, is it
always safe to assume that:

a)Digits come before letters?

b)Letters are in ascending order, i.e. A before B, B before C, etc.?


Character orderings are entirely determined by the collation that you
choose.  So you should choose a collation the produces the ordering
you want. :-)



To be conservative, should I set collation order?


Yep.

--
Paul DuBois, MySQL Documentation Team
Madison, Wisconsin, USA
MySQL AB, www.mysql.com

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Collation Order in MySQL?

2007-04-10 Thread David T. Ashley

I'd like to have a table in MySQL with the key field being a 12-character
text string consisting of digits and upper-case letters (minus the vowels
and Y, to prevent accidental bad words), i.e. something like:

XM39C6B4...

When I do queries and get back result sets sorted on this text string, is it
always safe to assume that:

a)Digits come before letters?

b)Letters are in ascending order, i.e. A before B, B before C, etc.?

To be conservative, should I set collation order?

Thanks.