热线电话:13121318867

登录
2022-10-31 阅读量: 442
mysql学习17-多表查询练习3

-- 31 查询每位员工的工资等级;empno,ename,sal,grade(不等值连接)

select * from salgrade;

select empno 员工编号,ename 员工姓名,sal 工资, grade 工资等级

from emp left join salgrade on sal>=losal and sal <= hisal;

select * from emp;

# 课堂练习 查询每位"manager"的工资等级;输出 empno,ename,job,sal,grade

select * from salgrade;

select empno 员工编号,ename 员工姓名,sal 工资, grade 工资等级

from emp left join salgrade on sal>=losal and sal <= hisal

where job ="manager";


0.0000
0
关注作者
收藏
评论(0)

发表评论

暂无数据
推荐帖子