I am stuck with doing a simple join in SQLite.
I have two tables - one with data, and other relational one with pointers:
References
containsReferenceID
andReference
REL_References_Pages
containsReferenceID
andPageID
Normal join query works OK and returns good result(s):
SELECT Reference
FROM "References"
NATURAL JOIN REL_References_Pages
WHERE PageID = 6
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:
SELECT Reference
FROM "References"
JOIN REL_References_Pages ON "REL_References_Pages.ReferenceID" = "References.ReferenceID"
WHERE PageID = 6
Any ideas?
I could just use NATURAL JOIN, but I am wondering why normal join doesn't work.
Also, the table References
has a stupid name, but it is what it is.