多于两个表的连接-复杂查询技术-连接

时间:2024-05-15 15:58:10
【文件属性】:

文件名称:多于两个表的连接-复杂查询技术-连接

文件大小:671KB

文件格式:PPT

更新时间:2024-05-15 15:58:10

sql

多于两个表的连接 EMPLOYEES LOCATIONS DEPARTMENTS 为了连接n个表,你最少需要n-1 个连接条件 … * Additional Search Conditions Sometimes you may need to join more than two tables. For example, to display the last name, the department name, and the city for each employee, you have to join the EMPLOYEES, DEPARTMENTS, and LOCATIONS tables. SELECT e.last_name, d.department_name, l.city FROM employees e, departments d, locations l WHERE e.department_id = d.department_id AND d.location_id = l.location_id; …


网友评论