以下表,查询部门人数大于2的员工信息,并把员工姓名和头衔一块儿输出出来string
1.员工表(employee)it
2.部门表(department)test
3.Sql语句:select
select CONCAT(name,title) ,sex,employee_no,department_id from test.employee where department_id in(select department_id from test.employee group by department_id HAVING(count(department_id)>1));im
4.结果查询
5.主要Concat(string,string,....)和HAVING()的使用img
6.太晚了,后续补上。。。哇嘎嘎co