Illegal mix of collations error in MySql

后端 未结 19 2217
醉梦人生
醉梦人生 2020-11-29 01:11

Just got this answer from a previous question and it works a treat!

SELECT username, (SUM(rating)/COUNT(*)) as TheAverage, Count(*) as TheCount 
FROM ratings         


        
19条回答
  •  醉梦人生
    2020-11-29 01:51

    If you want to avoid changing syntax to solve this problem, try this:

    Update your MySQL to version 5.5 or greater.

    This resolved the problem for me.

提交回复
热议问题