有个问题,where不是先过滤在查的嘛,这样多表查询的笛卡尔积岂不没啥影响呀?哦,不对,只是那只是在和having做比较的时候 ,先过滤,后分组
                
                    
                    2017-09-29
                
            数据多的话用连接查询
select *
from emp join dept on emp.deptno=dept.deptno and dept.dname='sales';
                select *
from emp join dept on emp.deptno=dept.deptno and dept.dname='sales';
                    
                    2017-09-26
                
            select e.empno,e.ename,b.ename
from emp e left join emp b
on e.mgr = b.empno
order by 3 desc
这样就可以包含子连接中的King没有包含的问题
                from emp e left join emp b
on e.mgr = b.empno
order by 3 desc
这样就可以包含子连接中的King没有包含的问题
                    
                    2017-09-11