连接两个表,“on 子句"中的错误 1054 未知列

连接两个表,“on 子句

问题描述:

我正在尝试通过用户 ID 连接两个表.我试过这个:

I am trying to join two tables by userid. I tried this:

select *
from crm_public.crm_user
join crm_sare.nl_user u on v.userid=u.userid
;

不幸发生错误:错误代码:1054.on 子句"中的未知列v.userid"

我做错了什么?感谢您的帮助.

What did I do wrong? Thanks for your help.

尝试分配别名并确保正确的列名

try assing the alias and be sure of the correct column name

select *
from crm_public.crm_user as v
join crm_sare.nl_user as u on v.userid=u.userid
;