【发布时间】:2014-05-31 00:50:08
【问题描述】:
我有两个结构/列完全相同的表。我需要根据第二列(标题)将它们组合起来而不重复。第一列是 ID,这些可能有重复但应该忽略。
数据库结构示例
id(主键,自增),标题(唯一),描述,链接
Ex. Table 1
1 Bob thisisbob bob.com
2 Tom thisistom tom.com
3 Chad thisischad chad.com
Ex. Table 2
1 Chris thisischris chris.com
2 Chad thisischad chad.com
3 Dough thisisdough doug.com
What I need in Table 3
1 Bob thisisbob bob.com
2 Tom thisistom tom.com
3 Chad thisischad chad.com
4 Chris thisischris chris.com
5 Dough thisisdough doug.com
两个表各有大约 500 万个条目/行。我需要最有效的方式来组合它们。
【问题讨论】:
标签: mysql database-administration