51Testing软件测试论坛

标题: 假设有employees表(包含employee_id、department_id、employee_name)和departmen... [打印本页]

作者: 测试积点老人    时间: 2024-11-7 09:50
标题: 假设有employees表(包含employee_id、department_id、employee_name)和departmen...
假设有employees表(包含employee_id、department_id、employee_name)和departments表(包含department_id、department_name),查询每个员工所属部门的名称和员工姓名


作者: kallinr    时间: 2024-11-8 09:18
SELECT e.employee_name, d.department_name
FROM employees e
JOIN departments d ON e.department_id = d.department_id;
作者: oliver.tang    时间: 2024-11-8 09:20
select …… join
作者: 海海豚    时间: 2024-11-8 10:54
SELECT e.employee_name, d.department_name
FROM employees e
JOIN departments d ON e.department_id = d.department_id;
作者: jingzizx    时间: 2024-11-8 11:31
SELECT e.employee_name, d.department_name
FROM employees e
JOIN departments d ON e.department_id = d.department_id;
作者: 你好浮戈    时间: 2024-11-8 13:16
SELECT e.employee_name, d.department_name
FROM employees e
JOIN departments d ON e.department_id = d.department_id;
作者: litingting0214    时间: 2024-11-8 13:54
SELECT e.employee_name, d.department_name
FROM employees e
JOIN departments d ON e.department_id = d.department_id;




欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/) Powered by Discuz! X3.2