select u.id,u.name,c.name as 部门,cc.name as 职位 form user as u
join career as c on u.部门ID=c.id
join career as cc on u.职位ID=c.id
select a1 ,a2 from table1 where a2='班组长'union all
select a1,a2 from table2 where a2='班组长'
union all
select a1,a2 from table3 where a2='班组长'
5. 查询出每个雇员的雇员编号,实发工资,应发工资。Select 雇员编号,基本工资+ 职务工资 as 实发工资,基本工资+ 职务工资 - 扣除 as 应发工资 from 工资表;
6. 查询姓“张”且年龄小于40的员工的记录。
select * from 雇员表 where 姓名 like ‘张%’ and 出生日期>'1972-09-11'
7. 查询所有雇员的姓名、性别、职称、部门名称。
累了不想谢了 自己找猫画吧
8. 查询“生产部”的所有员工信息。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)