Nested Loops Join

Unfortunately, the last approach is what tends to get used: Can be implemented in C/C++, and avoids a temporary table.