首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > SQL Server >

查询titles表中pub_id出现次数超过6次以上的记录解决方案

2012-03-31 
查询titles表中pub_id出现次数超过6次以上的记录如题``[解决办法]select * from titles where pub_id in(s

查询titles表中pub_id出现次数超过6次以上的记录
如题``

[解决办法]
select * from titles where pub_id in
(
select pub_id from titles group by pub_id
having count(*)> 6
)
[解决办法]
select pub_id from 表 group by pub_id having count(pub_id)> 6

热点排行