员工
开斋节工资
1个查尔斯3000
2 kiran 2000
3 naveen 8000
4 manju 7000
系
deptid dname
101名查尔斯
102 kiran
103 naveen
104 manju
注册
deptid eid
101 1
102 2
103 3
104 4
向print(employee)ename和(department)dname写一个查询。
答案 0 :(得分:0)
SELECT a.ename, b.depart, c.eid
FROM employee a
INNER JOIN department b on a.ename=b.dname
INNER JOIN register c on b.deptid=c.deptid
where a.ename=b.dname and b.deptid=c.deptid;