我有以下的mysql查询:
SELECT count(student_name) AS total_student,school_name FROM `student`
LEFT JOIN school_info ON school_info.school_id=student.school_id
WHERE student.status='0'
返回值:
total_student school_name
0 NULL
我试图实现的目标是:如果 total_student = 0,则不显示任何值或NULL。
total_student school_name
请问您如何做到这一点?
谢谢 :)