您的位置:首页 > 运维架构 > Linux

西城110/linux高级作业(12.26)

2012-12-26 22:42 218 查看
Insert into niu values (1, ‘lilei’, ‘F’, ‘1’, ‘1987-10-20’, 3520.5, 13565489561, ‘beijing’, ‘wohendidiao’);





按姓名查找select * from niu where name=’zouying’;




查找薪水大于5000的 select count(*) from niu where salary>5000;





每个部门多少人
例子Select count(*) from niu where dept_id=1;





每个部门的平均薪水
例子 select avg (salary) from niu where dept_id=1;





描述为空的
Select * from niu where description is NULL;





每个部门女员工,薪水最大值
Select max(salary) from niu where gender=’f’ group by dept_id;




名字以L开头的用户
Select * from niu where name like ‘l%’;



内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: