I am trying to join two tables, and for some reason I keeping getting:
ERROR: syntax error at or near “JOIN”
My code is:
SELECT c.visit, d.cake FROM customer c, INNER JOIN desert d ON c.visit = d.visit LIMIT 10;
Advertisement
Answer
The comma is unnecessary:
SELECT c.visit, d.cake FROM customer c -- here INNER JOIN desert d ON c.visit = d.visit LIMIT 10;