Thursday, February 22, 2018
sql - what is the advantage of inner join tables
Answer
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 !!
Subscribe to:
Post Comments (Atom)
plot explanation - Why did Peaches' mom hang on the tree? - Movies & TV
In the middle of the movie Ice Age: Continental Drift Peaches' mom asked Peaches to go to sleep. Then, she hung on the tree. This parti...
-
How to display something on or after selecting a specific radio button, for example is I have a group of radio button Interest Value o 3% ...
-
I use the code below to update the url link based on user text input: Right now it works pretty fine when someone clicks the submit ...
-
I need to be able to determine when an object is created (not a DOM element -- a javascript object). An answer to this question has some ve...
No comments:
Post a Comment