Page 1 of 1

[SQL] JOINing 2 row sets

PostPosted: Fri Jan 18, 2019 8:49 pm
by Villeroy
Original topic: viewtopic.php?f=13&t=96607&p=462482#p462482

What does the JOIN keyword do with 2 tables?
Why are there so many variants of JOIN in the literature on SQL? Well, many of them are equivalent to each other.
How is it related to the Cartesian Product of the 2 tables?
Is there any difference between the inner join and the selection from 2 tables where A.X=B.Y? Answer: Some old fashioned database engines work more efficiently with JOINs. In HSQL they are equivalent.

Re: [SQL] JOINing 2 row sets

PostPosted: Sat Jan 26, 2019 12:18 am
by UnklDonald418
Thanks for the useful examples, but I did notice a problem. Most of your queries contain inline comments that are preceded by //. That works fine in the Direct SQL mode, but most visitors will attempt to run them in the default mode and the Base parser will raise a Syntax error. Apparently the parser only allows comments to be preceded by --.