SELECT COUNT(1), COUNT(IF(state = 1, true, null)), COUNT(IF(state = 0, true, null))
FROM fms_device
MySQL查询参数内使用if判断
最新推荐文章于 2024-04-16 14:23:55 发布
SELECT COUNT(1), COUNT(IF(state = 1, true, null)), COUNT(IF(state = 0, true, null))
FROM fms_device