【发布时间】:2011-02-23 21:55:50
【问题描述】:
我从这个查询中得到以下错误:
1054 - “on 子句”中的未知列“sheet_items.color_id”
select sheet_items.sheet_id, sheet_items.quantity, materials.material, colors.color
from sheet_items, materials
inner join colors
on colors.color_id=sheet_items.color_id
where sheet_items.sheet_id=4 and sheet_items.material_id=materials.material_id
有什么想法吗?提前致谢!
【问题讨论】:
-
好吧,
sheet_items有一个名为color_id的列吗? -
你能粘贴这些表的架构吗?消息很清楚,您在表 sheet_items 中没有名为 color_id 的列
-
我确实有一个名为 color_id 的列,这就是为什么它是一个奇怪的错误。