Thursday, 22 February 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)
casting - Why wasn't Tobey Maguire in The Amazing Spider-Man? - Movies & TV
In the Spider-Man franchise, Tobey Maguire is an outstanding performer as a Spider-Man and also reprised his role in the sequels Spider-Man...
-
The whole error output being: LNK2019 unresolved external symbol wWinMain referenced in function "int __cdecl __scrt_common_main_seh(vo...
-
I have come across CORS issues multiple times and can usually fix it but I want to really understand by seeing this from a MEAN stack paradi...
-
I recently used canvas to conert images to webp, using : const dataUrl = canvas.toDataURL('image/webp'); But this takes a lots of ti...
No comments:
Post a Comment