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.
嗨,这里我的场景也是创建现有表之间的关系,这些表没有/没有定义任何关系,但在数据库的多个表中具有共同的字段名称。
是否有任何工具可以生成/实现上述场景。
我认为这应该可以解决问题:
SELECT T1.id, T1.Name, T1.sal, T2.Sid, T2.department, T2.category FROM T1 NATURAL JOIN T2
这将连接公共字段上的表,只留下它们在字段上具有相同值的行。