一个查询! select count(distinct convart(char(10),a) + convert(char(10),b) +convert(char(10),c)) from table 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 select count(*) from table group by a,b,c select count(*) from (select distinct a,b,c from table ) t select count(*) from (select distinct a,b,c from table ) t select count(*) from (select distinct a,b,c from table ) t 在t中找不到dept呀!!!select count(*) from (select distinct a,b,c from table ) t 可能我意思表达有误是 select count(t.a) from (select distinct a,b,c from table ) t不是求a,b,c的和,是把table中a,b,c先查询出来,然后计算总记录。 select count(*) 总记录 from (select distinct a,b,c from table ) t select count(a) a的记录数,count(b) b的记录数,count(c) c的记录数 from (select distinct a,b,c from table ) t 完了,越说越糊涂了举例如下:a b c d1 2 3 1 2 31 2 41 3 5结果是:3 select count(*) from (select distinct a,b,c from table ) t我试了一遍,在sql中可以执行,在pb中不可以~ 请教一个相当列合并的问题 关于查询from的问题 请教:当前日期的前一个月,用SQL怎么写啊,很急,谢谢 如何给表增加自动序号[int] IDENTITY (1, 1)? 优化sql 一条SQL语句 如何让Sql server 2005 远程连接到 sql Server 2008 如何从DATASET中查询所要的内容 sql server 2000 和 sql server 2005 中通过数据库配置让表常驻内存 关与计算余额的问题(SQL查询) 再谈JAVA与数据库 sql server 服务器版 在安装完以后。可以更改sa 的密码吗?(不重装)
select count(*) from (select distinct a,b,c from table ) t
select count(*) from (select distinct a,b,c from table ) t
是 select count(t.a) from (select distinct a,b,c from table ) t不是求a,b,c的和,
是把table中a,b,c先查询出来,然后计算总记录。
举例如下:
a b c d
1 2 3
1 2 3
1 2 4
1 3 5
结果是:3