최대급여가 35000이상 40000이하인 사람의 성과 이름을 검색할때

 

 

select first_name, last_name

from employees

inner join jobs

on employees.job_id = jobs.job_id

where jobs.max_salary >= 35000



 

--

 



select employees.first_name, employees.last_name

from employees

where job_id=(select job_id from jobs where max_salary >= 35000 and max_salary <=40000)


 

두가지 쿼리문을 전송하면 똑같은 결과가 나오는데

 

innerjoin문을 사용하는것이 어떤면에서 편리한가요?

 

개인적으론 그냥 괄호치고 조건을 입력하는게 더 편해보여서 -ㅅ-;;

profile