This shows you the differences between two versions of the page.
Next revision Both sides next revision | |||
kurs:joins [2008/10/23 12:25] 127.0.0.1 external edit |
kurs:joins [2010/04/16 13:36] mh |
||
---|---|---|---|
Line 24: | Line 24: | ||
on employees.department_id = departments.department_id | on employees.department_id = departments.department_id | ||
order by department_name desc, last_name, first_name; | order by department_name desc, last_name, first_name; | ||
+ | |||
+ | SELECT EMPLOYEES.FIRST_NAME, | ||
+ | EMPLOYEES.LAST_NAME, | ||
+ | DEPARTMENTS.DEPARTMENT_NAME, | ||
+ | LOCATIONS.CITY | ||
+ | FROM HR.EMPLOYEES left outer join HR.DEPARTMENTS on | ||
+ | DEPARTMENTS.DEPARTMENT_ID = EMPLOYEES.DEPARTMENT_ID | ||
+ | left outer join HR.LOCATIONS on | ||
+ | LOCATIONS.LOCATION_ID = DEPARTMENTS.LOCATION_ID | ||
+ | order by department_name desc | ||
SELF JOIN | SELF JOIN |