On Saturday, April 30, 2011 9:25:35 AM UTC+2, Thomas Mueller wrote: > > Hi, > > I just found out all comparisons in MySQL are case insensitive. > AFAIK, not always. It depends on the collation of the compared expressions. If the two collations differ, you get an error. Otherwise, it determines the case sensitivity and also the handling of Unicode, see http://forums.mysql.com/read.php?103,187048,188748#msg-188748
In MySql and Firebird, each column has not only a charset, but also a collation. A comparison of two case insensitive columns should probably be always case insensitive... Somewhere I saw a syntax like ... WHERE a = b COLLATE ... Maybe it's MySql, maybe it's the standard, I don't know. I don't like the global option "IGNORECASE" much. It's not as general as COLLATE and it adds state to the connection (which is a problem with connection pools). Actually, "=", LIKE, and REGEXP are ternary predicates (taking optional collation as the third argument). -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/h2-database?hl=en.
