SELECT employee_id,last_name,department_name,city
FROM employees e,departments d,locations l
WHERE e.department_id=d.department_id AND d.location_id=l.location_id
SELECT * FROM job_grades;
#查询名字、月薪和对应的等级
SELECT last_name,salary,grade_level
FROM employees,job_grades
WHERE employees.salary BETWEEN job_grades.lowest_sal AND job_grades.highest_sal;
SELECT * FROM employees;
SELECT last_name,salary,grade_level
FROM employees,job_grades
WHERE employees.salary >= job_grades.lowest_sal AND employees.salary<= job_grades.highest_sal;
SELECT*FROM employees;
SELECT e.employee_id,e.last_name,d.employee_id,d.last_name
FROM employees e,employees d
WHERE e.manager_id=d.employee_id;