create table tt( aa char(10),bb char (10)); insert into tt values('zhangsan','23'); insert into tt values('lisi','22'); insert into tt values('wanger','22'); select a.bb,count(*) from tt a where 1=1 group by a.bb having count(*)>'1'; 这样查出的结果能知道那个值重复了,不知道你是不是要这个。
追问
如图所示,只取同列变化了的值,很急,谢谢!
追答
yij
梦明
2024-05-13 04:58:06
select age , count(sid) from student group by age having count(sid) > 1 不知道你是不是这个意思
只是偶尔想起你
2024-05-13 03:31:49
select * from (select age,count(age) num from student group by age) a where num>=2 order by num