このクエリ:
SELECT customer_id, customer_name FROM customers WHERE isActive = '1' ORDER BY customer_name ASC
出力:
+-------------+-----------------------+
| customer_id | customer_name |
+-------------+-----------------------+
| 1 | Äname |
| 2 | Aname |
| 3 | Bname |
+-------------+-----------------------+
照合があるのに、なぜ特別なスウェーデン語の文字をソートしないのですか?utf8_swedish_ci
SHOW TABLE STATUS FROM myDatabase WHERE name = 'customers';
+-------------+----------------------------+
| Name | Engine | Collation |
+-------------+----------------------------+
| customers | MyISAM | utf8_swedish_ci |
+-------------+----------------------------+
私は自分のクエリに照合を入れようとさえしました:
SELECT * FROM customers WHERE isActive = 1 COLLATE utf8_swedish_ci ORDER BY customer_name ASC
しかし、それから私は得る:
Error Code: 1253. COLLATION 'utf8_swedish_ci' is not valid for CHARACTER SET 'binary'