Collation issues
Hi, I noticed that the following does not work in the MySQL command-line tool on the 'world' database (example database for the certification book):
SELECT Name, Population
FROm Country
WHERE (Continent, Code) = ('Europe', 'NLD')
ERROR 1267 (HY000): Illegal mix of collations (utf8_general_ci,IMPLICIT) and (latin1_swedish_ci,COERCIBLE) for operation '='
But the following does work:
mysql> SELECT Name, Population FROM Country WHERE Continent = 'Europe' AND Code = 'NLD';
+--------------+------------+
| Name | Population |
+--------------+------------+
| Netherlands_ | 15864000 |
+--------------+------------+
1 row in set (0.00 sec)
I think that the columns are UTF-8 (I changed that) but the input seems to be latin. It seems that in the first case there is implicit conversion of the charset, but in the second case there is not. Is that correct? And what does coercibility mean?
Regards,
Bas
Subject
Views
Written By
Posted
Collation issues
2907
September 16, 2010 06:16AM
1339
September 18, 2010 04:21PM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.