SqlServer查询重复数据
1、查询单列重复
select * from lcgl_task_ti_b where prn in (select prn from lcgl_task_ti_b group by prn having count (prn) > 1)
2、查询多列重复的
select a.* from lcgl_task_ti_b a,(select order_prn,st from lcgl_task_ti_b group by order_prn,st having count(1)>1) as b
原创
2020-09-24 11:23:03 ·
1624 阅读 ·
0 评论