Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <blockquote> <p>To answer your question <strong>there is no difference between LEFT JOIN and LEFT OUTER JOIN, they are exactly same</strong> that said...</p> </blockquote> <h2>At the top level there are mainly 3 types of joins:</h2> <ol> <li>INNER</li> <li>OUTER</li> <li>CROSS</li> </ol> <hr> <ol> <li><p><strong>INNER JOIN</strong> - fetches data if present in both the tables.</p></li> <li><p><strong>OUTER JOIN</strong> are of <strong>3</strong> types:</p> <ol> <li><code>LEFT OUTER JOIN</code> - fetches data if present in the left table.</li> <li><code>RIGHT OUTER JOIN</code> - fetches data if present in the right table.</li> <li><code>FULL OUTER JOIN</code> - fetches data if present in either of the two tables.</li> </ol></li> <li><p><strong>CROSS JOIN</strong>, as the name suggests, does <code>[n X m]</code> that joins everything to everything.<br> Similar to scenario where we simply lists the tables for joining (in the <code>FROM</code> clause of the <code>SELECT</code> statement), using commas to separate them.</p></li> </ol> <hr> <p><strong>Points to be noted:</strong></p> <ul> <li>If you just mention <code>JOIN</code> then by default it is a <code>INNER JOIN</code>.</li> <li>An <code>OUTER</code> join has to be <code>LEFT</code> | <code>RIGHT</code> | <code>FULL</code> you can not simply say <code>OUTER JOIN</code>.</li> <li>You can drop <code>OUTER</code> keyword and just say <code>LEFT JOIN</code> or <code>RIGHT JOIN</code> or <code>FULL JOIN</code>.</li> </ul> <hr> <p>For those who want to visualise these in a better way, please go to this link: <a href="http://www.codinghorror.com/blog/2007/10/a-visual-explanation-of-sql-joins.html" rel="noreferrer">A Visual Explanation of SQL Joins</a></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload