查询小错误 不知道这两个有什么区别
-- 6.找出部门10中所有经理和部门20中所有办事员以及即不是经理又不是办事员但薪金
-- 大于或等于2000的所有雇员的详细资料.
SELECT * from emp where deptno = 10 and job = 'MANAGER'
UNION
SELECT * from emp where deptno = 20 and job = 'CLERK';
UNION
SELECT * from emp where job not in ('MANAGER','CLERK') and sal >=2000;
select * from emp
where (deptno=10 and job='MANAGER')
or (deptno=20 and job='CLERK')
or (job not in ('MANAGER','CLERK') and sal>=2000);
这个两句有什么区别 为什么上面那个得不到正确答案 而下面的可以