开发者

the different between join condition and where condition

开发者 https://www.devze.com 2023-01-21 15:54 出处:网络
Somebody tell me what\'s the difference between two queries: Version A select开发者_运维技巧 p.LastName, o.OrderNo

Somebody tell me what's the difference between two queries:

Version A

select开发者_运维技巧 p.LastName, o.OrderNo  
  from Persons p, Orders o  
 where p.P_Id = o.P_Id

...and...

Version B

select p.LastName, o.OrderNo  
  from Persons p 
  join Orders o on p.P_Id = o.P_Id


Both use an INNER JOIN to combine records between the PERSONS and ORDERS tables. Version A is ANSI-89 syntax, and Version B is ANSI-92 syntax.

There's no performance difference between them, but the ANSI-92 syntax supports OUTER JOINs (LEFT, RIGHT, and FULL depending on the database) while the ANSI-89 does not.


assuming that "join" is a shorthand syntax for "inner join" i see no difference.

0

精彩评论

暂无评论...
验证码 换一张
取 消