1582 - Incorrect parameter count in the call to native function 'ISNULL',
错误代码:
SELECT SNUM,AVG(ISNULL(SCORE,0)) FROM SC WHERE SNUM IN ( select SNUM from sc where score < 90 group by SNUM having count(*)>2) GROUP BY SNUM
错误提示:
1582 - Incorrect parameter count in the call to native function ‘ISNULL‘,
错误原因:
mysql识别不了ISNULL,支持IFNULL,
修改后代码:
SELECT SNUM,AVG(IFNULL(SCORE,0)) FROM SC WHERE SNUM IN ( select SNUM from sc where score < 90 group by SNUM having count(*)>2) GROUP BY SNUM
运行无误!
文章来自:https://www.cnblogs.com/laochoubiji/p/9350241.html