我有三个表inline_topic_xref,embeded_media和topic_biblio_xref,其中TOPIC_IS和SECTION_ID是这些表中的公共列。其他栏目不同。如何根据这两列的公共值从三个表中获取数据?请帮我。
答案 0 :(得分:0)
这称为连接。像这样的东西
SELECT *
FROM inline_topic_xref A
LEFT JOIN embeded_media B ON A.TOPIC_IS = B.TOPIC_IS AND A.SECTION_ID = B.SECTION_ID
LEFT JOIN topic_biblio_xref C ON A.TOPIC_IS = C.TOPIC_IS AND A.SECTION_ID = C.SECTION_ID