서브쿼리
-
다중 행 서브쿼리 : ANY, ALL, EXISTS (+ subquery와 join)SQL/sql 문법(mysql, mariaDB) 2024. 5. 9. 14:43
▤ 목차" data-ke-type="html">HTML 삽입미리보기할 수 없는 소스✔ subquery VS join💻 코드로 보기총무부에 근무하는 직원들이 관리하는 고객 출력하기joinSELECT gogek_no, gogek_name, gogek_tel FROM gogekINNER JOIN jikwon ON jikwon.jikwon_no = gogek_damsanoINNER JOIN buser ON buser_num = buser_noWHERE buser_name='총무부'; subquerySELECT gogek_no, gogek_name, gogek_tel FROM gogek WHERE gogek_damsano IN (SELECT jikwon_no FROM jik..