例表T中 A B C 1 2 h 1 2 j 1 3 l 2 2 k执行sql语句后,应该得到前两行的数据。
有没有更简便的方法呢、??你看这样行不行Select a,b,c ,count(*) over(partition by a,b) cntfrom Twhere cnt > 1
你的方法也很好啊,不过要改,cnt它是识别不到的select * from(Select a,b,c ,count(*) over(partition by a,b)cntfrom t)where cnt> 1
没理解我的意思啊, 我要的是字段A重复,并且字段B也重复的数据。