Difference between EXISTS, IN and JOIN?
When it comes to databases, what difference does it make whether you use one of the three? Basically, the result is often the same.
The EXISTS predicate is used to check if a subtable returns at least one row, while the IN operator is used to check if a value is included in a given list of values.
Are there any other differences as to why I should use one or the other, or even the join?
Exists checks if any value exists at all, in check if a certain value is included, and joins 2 tabs.
Actually all three completely different things. So different that you can’t even count the differences. The only common thing is that all SQL operators are.
If you use IN, you can actually check whether a value exists or whether this A = return value is or?
If you use it with where, for example
Yes, using in for lists, and not for single values. That’s why “in.”
So after the motto “Ist “john” in this list”