Illegal mix of collations error in MySql

后端 未结 19 2048
醉梦人生
醉梦人生 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 02:16

    The problem here mainly, just Cast the field like this cast(field as varchar) or cast(fields as date)

    0 讨论(0)
提交回复
热议问题