2
這個查詢:MySQL不會ORDER BY瑞典字符AAO無法正常工作,即使排序規則是正確
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'
有什麼_column_整理? –
@ÁlvaroG.Vicario'utf8_swedish_ci' – David
什麼是SHOW CREATE TABLE客戶輸出? –