赞
踩
第一种方法
select username count(*) u from user_info group by username having u>1
第二种方法
select username count(*) from user_info group by username having count(username)>1
第三种方法,查询速度较慢
select username from user_info where username = (select username from user_info group by username having count(username)>1
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。