강의

멘토링

커뮤니티

Inflearn Community Q&A

hyeabc13433's profile image
hyeabc13433

asked

[A hundred words are not as good as seeing once] Intermediate SQL problem solving for data analysis

Problem 3 explanation

Placements에서 LEFT JOIN 뒤에 ON 조건

Written on

·

264

0

SELECT *
FROM students s
		 LEFT JOIN Friends f ON s.id = f.id

위에 코드랑

SELECT *
FROM students s
		 LEFT JOIN Friends f ON s.id = f.friend_id

아래 코드 두 개로 해봤는데요. 아직도 JOIN 뒤에 ON 조건을 쓰는 게 헷갈려요.

첫 번째 코드로 했을 때의 친구id랑 두 번째 코드로 했을 때의 친구id가 완전 달라지더라고요. 왜 그런건가요??

sqljoin조건

Answer 1

1

hyeabc13433님의 프로필 이미지
hyeabc13433
Questioner

아하 오 다른 문제 풀다가 이해했어요!ㅋㅋ

hyeabc13433's profile image
hyeabc13433

asked

Ask a question