当前位置: > 数据库group by语句...
题目
数据库group by语句
select * from hb_student_info where card_id in(select card_id from hb_student_info group by card_id having count(card_id)>1)
我知道这句的功能是查找出card_id相同的纪录 具体是怎么实现功能的,count函数大于1是什么意思?

提问时间:2020-11-06

答案
select card_id from hb_student_info group by card_id having count(card_id)>1group by 是按照card_id分组,配合having做条件筛选比如hb_student_info中数据如下:card_id 栏位1 栏位2 001 1 2001 2 2001 3 4002 4...
举一反三
我想写一篇关于奥巴马的演讲的文章,写哪一篇好呢?为什么好
奥巴马演讲不用看稿子.为什么中国领导演讲要看?
想找英语初三上学期的首字母填空练习……
英语翻译
1,人们染上烟瘾,最终因吸烟使自己丧命.
版权所有 CopyRight © 2012-2019 超级试练试题库 All Rights Reserved.