Nick
Nick

Reputation: 19664

MySql - Unknown column in 'on clause'

I am trying to join two tables in MySql but I keep running into the following error:

Error Code: 1054 Unknown column 'list.user_id' in 'on clause'

SELECT list.title
FROM list
INNER JOIN user
ON list.user_id=user.id

The table 'list' does contain a FK to the user table called 'user_id'.

Can someone tell me what I'm missing?

Upvotes: 0

Views: 1909

Answers (1)

user319198
user319198

Reputation:

seems you have given wrong table name or column. please check if you have user table and user_id column in it.

Upvotes: 1

Related Questions