查询同一个表中的重复数据

sql数据库10年前 (2016)发布 admin
423 0
select distinct * from tb where 住址 in
(
select 住址 from (select distinct * from tb) t group by 住址 having count(*) > 1
) 

一张表找数据

--相同数据
select tel_no  
from a
intersect
select tel_no 
from b

--不同数据
select tel_no  
from b
except
select tel_no 
from a
© 版权声明

相关文章