[code=SQL]create table #tb
(
pkid int identity(1,1) primary key,
title varchar(5)
)insert #tb select 'A'
insert #tb select 'B'
insert #tb select 'C'
insert #tb select 'D'
insert #tb select 'E'
goselect count(distinct(*)) from #tb --这句为什么错
select count(distinct(pkid)) from #tb --正确
高手解答一下!谢了[/code]
(
pkid int identity(1,1) primary key,
title varchar(5)
)insert #tb select 'A'
insert #tb select 'B'
insert #tb select 'C'
insert #tb select 'D'
insert #tb select 'E'
goselect count(distinct(*)) from #tb --这句为什么错
select count(distinct(pkid)) from #tb --正确
高手解答一下!谢了[/code]
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货