Not in과 not exist, outter join, SQL의 hit ratio보기 Select ... from Emp where dept_no not in (select dept_no from dept where dept_cat='a'); 보다는 아래와 같이 변경 case 1 select ... from emp a, dept b where a.dept_no = b.dept_no(+) and b.dept_no is null and b.dept_cat(+) = 'a' case 2 select ... from emp e where not exits (select '1' from dept d where d.dept_no = e.dept_no and d.dept_cat='a'); case1보다는 case2가 좀 더 나은 결과를 보여준다고 한다 -_- (확인 안 해봄..--;) SQL의 hit .. 더보기 이전 1 ··· 645 646 647 648 649 650 651 ··· 713 다음