create table tb(日期 datetime,数字 int)insert into tb select '2011-08-21 02:10:00.000',10insert into tb select '2011-08-21 02:20:00.000',20insert into tb select '2011-08-21 02:30:00.000',30
insert into tb select '2011-08-22 03:10:00.000',100insert into tb select '2011-08-22 03:20:00.000',200insert into tb select '2011-08-22 03:30:00.000',300drop table tb----------------------------------------------------------------
--我想求2011-8-21这一天的数字这一列的总和
select sum(数字)from tb where 日期='2011-8-21'但是结果却是null
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货