"SQL 오른쪽 안티조인"의 두 판 사이의 차이

잔글 (Jmnote님이 SQL 오른쪽 안티 조인 문서를 SQL 오른쪽 안티조인 문서로 이동했습니다)
 
(다른 사용자 한 명의 중간 판 하나는 보이지 않습니다)
31번째 줄: 31번째 줄:
* https://docs.microsoft.com/en-us/power-query/merge-queries-right-anti
* https://docs.microsoft.com/en-us/power-query/merge-queries-right-anti


[[분류: JOIN]]
[[분류:조인]]

2021년 9월 23일 (목) 19:44 기준 최신판

1 개요[ | ]

SQL right anti join
SQL 오른쪽 안티 조인

2 예시: Sales & Countries[ | ]

Right-anti-join-operation.png

CREATE TABLE Sales (Date date, CountryID int(11), Units int(11));
INSERT INTO Sales (Date, CountryID, Units) VALUES
	('2020-01-01', 1, 40),
	('2020-01-02', 1, 25),
	('2020-01-03', 3, 30),
	('2020-01-04', 2, 35);

CREATE TABLE Countries (ID int(11), Country varchar(16));
INSERT INTO Countries (ID, Country) VALUES
	(3, 'Panama'),
	(4, 'Spain');

SELECT * FROM Countries
WHERE ID NOT IN ( SELECT CountryID FROM Sales )

3 같이 보기[ | ]

4 참고[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}