一个SQL语句写法的问题!!大家帮帮我!!谢谢!! insert into t2 from (select 单位,count(1) as 数量 from t1 group by 单位) as t 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 insert into t2 select 单位,count(1) as 数量 from t1 group by 单位 若t2表不存在select 单位,count(1) as 数量 into t2 from t1 group by 单位若t2表存在insert into t2 select 单位,count(1) as 数量 from t1 group by 单位 select 单位,count(1) as 数量 into t2 from t1 group by 单位 insert into t2 select 单位,count(*) as 数量 from t1 group by 单位 insert t2 select 单位,count(*) from t1 group by 单位 select 单位,count(*) 数量 from table group by 单位用group by 分组select 单位,性别,count(*) 数量 from table group by 单位.性别还可以对性别分组统计 求一句SQL C#开发的C/S程序连接远程数据库,客户端需要安装SQL SERVER吗? SQL2008和SQL2005备份的方法一样吗? 辅助表表进 行字符串分拆的函数有点看不明白,向大家请教,是邹健的代码 求一个每月更新假期的job写法 查询所有订单的最新信息的SQL 大家来给我优化优化这段SQL代码,有成效就加分!!! MS-SQL2005分区表怎么建 如何在局域网内,对别的机子实现远程安装sql server系统? 关于datetime数据类型的问题! 请求帮助!谢谢! 请问Uincode字符是什么,包括中文吗?
select 单位,count(1) as 数量 into t2 from t1 group by 单位
若t2表存在
insert into t2 select 单位,count(1) as 数量 from t1 group by 单位
select 单位,count(*) as 数量 from t1 group by 单位
用group by 分组select 单位,性别,count(*) 数量 from table group by 单位.性别
还可以对性别分组统计