๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ
  • Welcome.
:: DBMS ๐Ÿšฉ/ํ”„๋กœ๊ทธ๋ž˜๋จธ์Šค SQL ๊ณ ๋“์  kit ํ’€์ด

JOIN>์—†์–ด์ง„ ๊ธฐ๋ก ์ฐพ๊ธฐ

by EunBird 2023. 2. 26.
-- ์ฝ”๋“œ๋ฅผ ์ž…๋ ฅํ•˜์„ธ์š”
SELECT **DISTINCT**(B.ANIMAL_ID), B.NAME
FROM ANIMAL_INS A
**JOIN ANIMAL_OUTS B**
**WHERE B.ANIMAL_ID NOT IN (SELECT ANIMAL_ID FROM ANIMAL_INS)**
ORDER BY ANIMAL_ID;
728x90

๋Œ“๊ธ€