Self1 SQL 기본 26 셀프 조인(self join) # self join (셀프 조인) # 기본 SELECT tableA.col, tableB.col FROM table AS tableA JOIN table AS tableB ON tableA.some_col = tableB.other_col # 기본에 대한 해석코드 #1 SELECT emp.col, report.col FROM employees AS emp JOIN employees AS report ON emp.emp_id = report.report_id #2 SELECT emp.name, report.name AS rep FROM employees AS emp JOIN employees AS report ON emp.emp_id = report.report_id ================= 문제.. 2022. 8. 31. 이전 1 다음