日期:2025-07-15 01:14:23 人气:1

    A+
热门评论

SQL 查询一个字段所有的之出现次数大于2的条数

with tmp(Name) as(select '张三' union allselect '张三' union allselect '李四' union allselect '王五' union allselect '王五' union allselect '王五' union allselect '赵六' union allselect '赵六') select count(*) from (select Name from tmp group by Name having count(*)>1) t结果为:

阅读全文