0
 Select A.*,B* from A,B  where A.ID = B.SOMEID

or

 Select A.*,B* from A INNER JOIN B ON A.ID = B.SOMEID

What is difference between two usages and when to use what?

Edit: I know that when we use join we have some options such as outer,left or right. But i wonder which one is suitable for specific cases?

Mert Serimer
  • 1,217
  • 2
  • 16
  • 38
  • 4
    Same execution. Old style, implicit JOIN (not recommended), or modern, explicit JOIN (recommended). – jarlh Mar 01 '17 at 11:33
  • 1
    The DBMS will execute the query the same, so use a join. – SaggingRufus Mar 01 '17 at 11:35
  • 1
    @SaggingRufus, both are joins... (implicit or explicit.) – jarlh Mar 01 '17 at 11:36
  • @jarlh I am just trying answer "from multiple tables" or "join" part of the question. I am aware that these are both joins and that the DBMS will handle these queries exactly the same. I just wanted to clarify he should use the join syntax. – SaggingRufus Mar 01 '17 at 11:38
  • 1
    You could read this topic for more information: [Bad habits to kick : using old-style JOINs](https://sqlblog.org/2009/10/08/bad-habits-to-kick-using-old-style-joins) – Pham X. Bach Mar 01 '17 at 11:40
  • @SaggingRufus, yes, you know that, but OP didn't. I just wanted to clarify that both ways are joins. – jarlh Mar 01 '17 at 11:45

0 Answers0