0

Assuming I have two tables : users and products.

users

uid | name
-------------
1   | Peter
2   | Mary
3   | Ben

products

pid | product | uid
-------------------------
1   | apple   | 2
2   | lemon   | 2
3   | banana  | 2
4   | orange  | 3

What is the difference between:

SELECT p.*, u.name FROM products p INNER JOIN users u ON p.uid = u.uid

and

SELECT p.*, u.name FROM products p, users u WHERE p.uid = u.uid 

Are they "logically" the same? (which both gives the intersection of the two tables)

Also, is there any performance difference between them?

user3571945
  • 184
  • 1
  • 14

0 Answers0