This Postgres query doesn’t work:

SELECT *
FROM users
JOIN accounts
ON users.accountId = accounts.id 

Even when you clearly have a column named accountId .

As this Stackoverflow question shows, PostreSQL converts column names to lower case in a SQL query, which means mixed case column names will give that error. You can fix it by putting the column name in quotation marks:

So this works:

SELECT *
FROM users
JOIN accounts
ON users."accountId" = `accounts.id`

Questions? Other issues you've run into? Let us know by chatting into the site! 

Did this answer your question?