日期:2014-05-18  浏览次数:20740 次

from 后面两个表,一个有inner join 一个没有。有啥区别捏?
select * from tb1, tb2 where tb1.city = tb2.city and tb1.name = tb2.name

select * from tb1 inner join tb2 on tb1.city = tb2.city and tb1.name = tb2.name

------解决方案--------------------
运行结果是一样的
------解决方案--------------------
没区别。执行的时候优化器会生成一样的执行计划
------解决方案--------------------
没区别。是内连接的两种不同写法 的形式
------解决方案--------------------
探讨
select * from tb1, tb2 where tb1.city = tb2.city and tb1.name = tb2.name

select * from tb1 inner join tb2 on tb1.city = tb2.city and tb1.name = tb2.name

------解决方案--------------------
没有区别