在SQL中用了union all怎样去掉重复拜托各位大神

2025-06-28 05:56:42
推荐回答(1个)
回答1:

在外层套1个查询,加上distinct关键字就能够去重了select distinct * from (select * from a union all select * from b)t 查看更多答案>>