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.
MySQL中是否有一种简单的方法来合并两个相似表(相同字段)的内容,同时避免重复?
由于您提到它们是相似的表,您可以使用UNION,而不指定ALL,它只会返回唯一的行。
UNION
ALL
SELECT * FROM table1 UNION SELECT * FROM table2