怎么将所查数据进行汇总成一行::
select s.name,s.dept_name
from department d
left outer join student s
on d.dept_name=s.dept_name
order by building;
SELECT s.dept_name,GROUP_CONCAT(s.name SEPARATOR ',') name
from department d
left outer join student s
on d.dept_name=s.dept_name
GROUP BY s.dept_name