INNER JOIN clause returning no rows while NATURAL JOIN does
<p>I am stuck with doing a simple join in SQLite.</p>

<p>I have two tables - one with data, and other relational one with pointers:</p>

<ul>
<li><code>References</code> contains <code>ReferenceID</code> and <code>Reference</code></li>
<li><code>REL_References_Pages</code> contains <code>ReferenceID</code> and <code>PageID</code></li>
</ul>

<p>Normal join query works OK and returns good result(s):</p>

<pre><code>SELECT Reference
FROM "References" 
NATURAL JOIN REL_References_Pages
WHERE PageID = 6
</code></pre>

<p>But if I try to do an explicit JOIN, the result is without an error, but returns no result. Where it is stuck is on the ON clause:</p>

<pre><code>SELECT Reference
FROM "References" 
JOIN REL_References_Pages ON "REL_References_Pages.ReferenceID" = "References.ReferenceID"
WHERE PageID = 6
</code></pre>

<p>Any ideas?</p>

<p>I could just use NATURAL JOIN, but I am wondering why normal join doesn't work.</p>

<p>Also, the table <code>References</code> has a stupid name, but it is what it is.</p>