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.
我UNION用来获取不同表中的所有名称。 我的表总共有大约 10000 行。 但查询返回 468 行!! 我的查询是:
UNION
SELECT name FROM `shopping` UNION SELECT name FROM stores UNION SELECT name FROM concert UNION SELECT val AS name FROM event UNION SELECT name FROM fastfood
哪里有问题?
UNION 删除重复值。您可能想要 UNION ALL 代替。