Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我需要使用显式连接来连接 3 个表。所有三个表都没有一个公共键。
如果您需要连接表,则每对都需要一个公共密钥。 所以你可以尝试这样的事情:
SELECT t1.*, t2.*, t3.* FROM table1 t1 INNER JOIN table2 t2 ON t1.id1 = t2.id1 INNER JOIN table3 t3 ON t2.id2 = t3.id2