예제 ) SALES와 RESEARCH 부서에 해당하는 직원의 정보만 보고 싶을 때?
👉 where 절에 따로따로 지정해서 써줄 수도 있지만
select *
from employee e
where e.dept = 'SALES' or e.dept ='RESEARCH'
👉 in ()을 써서 괄호 안에 원하는 value 값을 콤마(,)로 묶어 지정할 수 있음
select *
from employee e
where e.dept in('SALES' ,'RESEARCH')
728x90
'SQL' 카테고리의 다른 글
[concat 함수] 문자열 더하기 (0) | 2023.03.18 |
---|---|
[to_date() 함수] 문자열을 날짜데이터로 (0) | 2023.03.18 |
[Mode Project 1] A Drop in Engagement (4) (0) | 2023.03.07 |
[Mode Project 1] A Drop in Engagement (3) (0) | 2023.03.07 |
[Mode Project 1] A Drop in Engagement (2) (0) | 2023.03.07 |