码迷,mamicode.com
首页 > 其他好文 > 详细

1582 - Incorrect parameter count in the call to native function 'ISNULL',

时间:2018-07-22 16:59:03      阅读:4196      评论:0      收藏:0      [点我收藏+]

标签:ifnull   bsp   cal   font   mysq   原因   UNC   sel   错误代码   

错误代码:

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

 运行无误!

1582 - Incorrect parameter count in the call to native function 'ISNULL',

标签:ifnull   bsp   cal   font   mysq   原因   UNC   sel   错误代码   

原文地址:https://www.cnblogs.com/laochoubiji/p/9350241.html

(0)
(1)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!