12.07.2015 Views

Module 13 (Introduction to SQL - Part 2).pdf

Module 13 (Introduction to SQL - Part 2).pdf

Module 13 (Introduction to SQL - Part 2).pdf

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

The CROSS JOINThis is a very odd type of join. In a cross join,every record from the left-hand table is matched <strong>to</strong>every record from the right-hand table, in amultiplicative way. The resulting recordset can behuge (that is, m × n records).Thus, if we had 500 employees and 40000 ordersin our database (and didn’t use any WHERE clause<strong>to</strong> limit our selection), a CROSS JOIN wouldreturn 500 x 40000 = 20,000,000 records!

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!