Skip to content
Advertisement

Difference between SQL JOIN and querying from two tables

What is the difference between the query

and this one

Advertisement

Answer

There is a small difference in syntax, but both queries are doing a join on the P_Id fields of the respective tables.

In your second example, this is an implicit join, which you are constraining in your WHERE clause to the P_Id fields of both tables.

The join is explicit in your first example and the join clause contains the constraint instead of in an additional WHERE clause.

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement