【转】sql用逗号连接多张表对应哪个join?

逗号连接查询(用where连接条件):

select order.id, order.orderdate,employee.id,employee.name
from order,employee
where order.empid=employee.id

等价于inner join查询:

select o.id, o.orderdate,e.id,e.name 
from order o 
inner join employee e
on o.empid=e.id

 https://blog.csdn.net/huanghanqian/article/details/52847835

posted @ 2018-04-18 17:53  morein2008  阅读(603)  评论(0编辑  收藏  举报