1

I have seen some queries with different methods:

 Method 1:
    select A.col1,A.col2,B.col1,B.col2 
    from tblA A,tblB B
    where A.ID=B.ID

Method 2:
select A.col1,A.col2,B.col1,B.col2 
from tblA A join tblB B on A.ID=B.ID

What is the difference between these two queries or advantage of using one on other? if we use just JOIN keyword instead of INNER JOIN/OUTER JOIN/LEFT JOIN which join it is to be called?

Help Appreciated!

SHEKHAR SHETE
  • 5,964
  • 15
  • 85
  • 143

1 Answers1

0

JOIN means INNER JOIN.

Check this similar question, especially this answer.

Community
  • 1
  • 1
Michel de Ruiter
  • 7,131
  • 5
  • 49
  • 74
  • thanks @Michel de Ruiter for replying. So, what should we use Method1 or Method2 preferably? I think we should go for Method2 right? – SHEKHAR SHETE Sep 05 '13 at 07:43
  • @SHEKHARSHETE I certainly do. It's been introduced long ago for a reason. The comma notation is for backwards compatibility only. – Michel de Ruiter Sep 05 '13 at 10:08