现在的位置: 首页 > 综合 > 正文

查询是否包含字段重复的数据

2018年08月10日 ⁄ 综合 ⁄ 共 137字 ⁄ 字号 评论关闭

查询是否多于两条重复数据

 

select * from Tablea a where exists (select count(*) from Tableb b where a.col1= b.col1 and a.col2=b.col2 and a.col3= b.col3 having count(*)>2)

 

 

抱歉!评论已关闭.