摘要:
左连接:包含所有的左边表中的记录甚至是右边表中没有和它匹配的记录。右连接:包含所有的右边表中的记录甚至是左边表中没有和它匹配的记录。select ename,deptname from emp left join dept on emp.deptno = dept.deptno;select ename,deptname from dept right join emp on dept.deptno = emp.deptno;================如上查询出来的结果是一样的。union和union all的主要区别是union all是把结果集直接合并在一起,而union是将unio 阅读全文
posted @ 2014-01-26 11:50
google4y
阅读(266)
评论(0)
推荐(0)

浙公网安备 33010602011771号