我不明白这一点。
有什么区别
select e.empid from employee_table e inner join customer_table c on deref(c.infos).personid = deref(e.infos).personid order by e.empid;和
select e.empid from employee_table e, customer_table c where deref(c.infos).personid = deref(e.infos).personid order by e.empid;结果是一样的。 一个比另一个更快?
什么时候使用内连接我们可以简单地从多个表中选择?
I can't get the point.
What is the difference between
select e.empid from employee_table e inner join customer_table c on deref(c.infos).personid = deref(e.infos).personid order by e.empid;and
select e.empid from employee_table e, customer_table c where deref(c.infos).personid = deref(e.infos).personid order by e.empid;The results are the same. Is one faster to perform than the other ?
When to use an inner join when we can simply select from multiple table ?
最满意答案
因为这两个查询是等价的。 但第一个是使用ANSI-92样式连接,第二个是使用ANSI-89样式连接。 较新的连接语法不容易出错,现在已经存在了25年。
您应该始终使用ANSI-92样式连接。 http://sqlblog.com/blogs/aaron_bertrand/archive/2009/10/08/bad-habits-to-kick-using-old-style-joins.aspx
Because these two queries are equivalent. But the first one is using ANSI-92 style joins and the second is using ANSI-89 style joins. The newer join syntax is less prone to error and it has been around for 25 years now.
You should always use the ANSI-92 style joins.
Bad habits to kick : using old-style JOINs更多推荐
发布评论