A Probably Incomplete, Comprehensive Guide to the Many Different Ways to JOIN Tables in SQL

Perhaps the most powerful SQL feature is the JOIN operation. It is the envy of all non-relational databases, because the concept is so simple, yet so universally applicable, when you want to "combine" two data sets. Put simply, when joining two tables, you're combining every row from one table with every row from another table, … Continue reading A Probably Incomplete, Comprehensive Guide to the Many Different Ways to JOIN Tables in SQL

SQL JOIN or EXISTS? Chances Are, You’re Doing it Wrong

I've noticed this very consistently with a lot of customers, and also with participants of our Data Geekery SQL Workshop (which I highly recommend to everyone, if you excuse the advertising): A lot of developers get the distinction between JOIN and SEMI-JOIN wrong. Let me explain... What are JOIN and SEMI-JOIN A little bit of … Continue reading SQL JOIN or EXISTS? Chances Are, You’re Doing it Wrong

No CROSS JOIN in MS Access

For the upcoming jOOQ 3.3, we're now integrating support for the MS Access database through the JDBC-ODBC bridge, which is included in the JDK up until Java SE 7. Note that it will be removed in Java 8! Alternative access to access databases (pun intended) can be obtained through a hack involving ucanaccess, which is basically combining the … Continue reading No CROSS JOIN in MS Access

CROSS JOIN, a nice example for a rarely used operation

In 95% of the cases, cartesian products originate from accidental cross join operations and cause unnecessary high load on a database. Maybe the results aren't even wrong, as someone may have applied a UNION or a DISTINCT keyword, to remove unwanted duplicates. But there are those 5% of SQL queries, where the cartesian product is … Continue reading CROSS JOIN, a nice example for a rarely used operation