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...
-
This question attempts to collect the few pearls among the dozens of bad C++ books that are published every year. Unlike many other programm...
-
I’m trying to run the following command that reads JSON from a file and formats it with jq : jq -n -r --arg m $( It produces the des...
-
I am new to dask and I found so nice to have a module that makes it easy to get parallelization. I am working on a project where I was able ...
No comments:
Post a Comment