源地址:http://zhidao.baidu.com/link?url=ZgCztNzCScRI5kAqGqug1LJvf7IX311EQs6fJ0-W1kOtWaaR7MrtLoV_228Ed8Fhbk6EZQeOSfZzCDQNcBUvtq
select a, count(1) from tab group by a就可以找出a有几条记录如果要找出多于一条的重复记录select a, count(1) from tab group by a having count(1) >1