1,按名字查找
select * from vfast where name=" ";
2,按薪水查找,薪水大于5000
select name from vfast where salary>=5000;
3,每个部门有多少人
select count(*) from vfast group by dept_id ;
4,每个部门的平均薪资
select avg(salary) from vfast group by dept_id;
5,查找描述字段为空的
select * from vfast where description is null;
6,求出每个部门女员工(F)薪水最高的
select name, max(salary) from vfast where gender='F' group by dept_id;
7,名字是以L开头的用户 (模糊查询)
select * from vfast where name like 'l%';
转载于:https://blog.51cto.com/niecc58/1101415