编程论坛
注册
登录
编程论坛
→
SQL Server论坛
[求助]怎么样才能找到count(fprojid)>1的fprojid的数据
梓风
发布于 2006-10-30 15:40, 604 次点击
select count(fprojid),fprojid as number from bill_item group by fprojid
怎么样才能找到count(fprojid)>1的fprojid的数据
4 回复
#2
luoshun
2006-10-30 16:49
用exists来计算呀
[此贴子已经被作者于2006-10-30 16:50:35编辑过]
#3
bygg
2006-10-30 20:17
select fprojid as 'number' from bill_item where count(fprojid)>1
[此贴子已经被作者于2006-10-30 20:22:37编辑过]
#4
潇洒老乌龟
2006-10-30 22:20
select count(fprojid),fprojid as number from bill_item group by fprojid
怎么样才能找到count(fprojid)>1的fprojid的数据
select fprojid as [number] , count(*) from bill_item group by fprojid having count(*) > 1
你是在查重复的fprojid吧?
#5
梓风
2006-10-31 13:44
谢谢,
1