62,243
社区成员




declare @t table(
name varchar(10)
)
insert into @t select '1'
insert into @t select '2'
insert into @t select '3'
insert into @t select '4'
insert into @t select '4'
select * from @t
select name from @t group by name
--select name n from @t group by n
select * from (select name n from @t) t group by n
select name,[COUNT] from (select name,COUNT(*) [count] from @t group by name) t group by name,[count] having [count]>1
select col1,col2,col3,count(*)
from @temp
group by col1,col2,col3 having count(*) > 1
select col1,col2,col3,count(*) as [count]
from @temp
group by col1,col2,col3 having count(*) > 1
select col1,col2,col3,count(*) as [count]
from @temp
group by col1,col2,col3 having count(*) > 1
select col1,col2,col3,count(*) as [count]
from @temp
group by col1,col2,col3 having count(*) > 1
select CorporateNo,count(*) from LMS_Centerlist
group by CorporateNo having count(*)>1
[code=VB]select col1,col2,col3,count(*) as [ALLcount]
from @temp
group by col1,col2,col3 having [ALLcount] > 1
[/code]