This Month What I Learned 19

주영택·2022년 7월 13일
1

This Month What I Learned

목록 보기
19/24

Mysql outer join 주의

select from / outer join / on / where 로 구분되는 구문에서 where 의 상태를 먼저 필터링할 것 같지만 그렇지 않다.

from 의 대상을 먼저 줄여주는 과정이 필요하다.

select * from (select * from xxx where 1=1 as yyy)
outer join zzz on yyy.id = zzz.yyy_id where xxx.state = 'xxx'

링크들

profile
NodeJS 백엔드 웹 개발자입니다.

0개의 댓글