mysqlcount(if)_mysqlsum(if())和count(if())用法
mysqlcount(if)_mysqlsum(if())和count(if())⽤法SELECT SUM(extcredits1) AS e1 FROM test;SELECT SUM(if(category=1,size,0)) ,COUNT(if(category=1,true,null)) FORM t_file;解析:sum(if(category=1,size,0))sum函数返回⼀个
时间:2023-05-19 热度:27℃