MySQL 1054 On子句中的未知列(MySql5.7)

时间:2016-06-27 15:49:04

标签: mysql join mysql-workbench

查询:

SELECT orphans.DIST_NAME, orphans.BRAND, orphans.DIST_ID, orphans.PROD_NAME as ORPHAN_PROD_NAME, dist.pack as Dist_Pack
FROM orphans, dist
INNER JOIN dist di
    ON di.DIST_NAME = orphans.DIST_NAME
INNER JOIN dist ds
    ON ds.DIST_ID = orphans.DIST_ID;

错误代码:1054。未知列' orphans.DIST_NAME'在' on条款'

我的所有字段都是文本字段。无论我怎么做,查询都不会运行。

0 个答案:

没有答案