你好我想加入使用MySQL查询两个表,并对此我无法retriev数据MySql的连接查询两个表
两个表是accountheader和accountheadermonths。
查询:
Select ah.AH_SUBNAME,ahm.AH_OPENINGBALANCE1
from erp_updated.accountheader ah,erp_updated.accountheader_months ahm
where ah.AH_CODE =" " AND ahm.AH_CODE=" " ;
在此先感谢 请帮
你的外键是什么? – gaurang171
这不是'加入'它是[*笛卡尔产品*](http://en.wikipedia.org/wiki/Cartesian_product) – alfasin
首先尝试选择所有列,如'Select ah。*,ahm。*'。当您的加入工作时,您将指定精确的列。 –