【发布时间】:2013-03-11 04:44:16
【问题描述】:
Table1 有一些数据作为类别
Table2 有一些与 table1 类别相关的数据
两个表之间的关系是table1的cat_id和table2的cat_ids。
我想要的是什么? 我需要显示 table1 和 table2 中的所有字段我只需要相关内容,即 id 存在于 cat_id(table1) 和 cat_ids(table2)
我正在使用像这样的查询select c.* ,cc.* from news_categories cc, news_content c where cc.cat_id = c.cat_ids group by cc.cat_id 这仅提供来自 table1 和 table2 的公共数据.. 我需要来自 table1 的公共数据和所有类别
谁能帮我?
【问题讨论】:
-
仅供参考,我假设 realtion 是关系*