检索出现次数的SQL语句
要把字段名为'IC卡号码'中重复出现的所有记录找出,例如卡号为1234的有6条记录,卡号为2345的有15条记录.....,要把这些记录一次全部找出.
select *
from cheku
where ic in
(
select ic
from cheku
group by ic
having count(ic) > 1
)
select *
from cheku
where ic in
(
select ic
from cheku
group by ic
having count(ic) > 1
)
浙公网安备 33010602011771号