News for hackers. Stuff that matters.
Re:Making Database Systems Usable by sgarland on Wednesday August 21, 2024 @11:54AM (#41311452)
Yes, although both MySQL and Postgres will automatically rewrite the latter to the former, in most circumstances. I still find it good practice to explicitly write the semijoin, to demonstrate the intent.

MySQL, but not Postgres, will also convert the inverse to an antijoin.

As an aside, this is also often a great example to demonstrate why you shouldn’t use SELECT *, since you can’t write a semijoin if you need the predicate column in the result.

There are no comments on this comment yet.