what is the advantage of inner join tables

Viewed 4181

imagine I have 2 simple tables

users (id,username,password)
shopping(user_id,product_id)   

and I use inner join to find each username buys which product :

select username,product_id
from shopping
inner join users
on users.id=shopping.user_id

but I can write a more simple query without using inner join and it works

select username,product_id
from shopping,users
where shopping.user_id=users.id

and result is the same I wonder to know what's the advantage of using inner join !!

1 Answers
Related