日期:2014-05-19  浏览次数:20373 次

SQL时间判断求合问题,高手进

create   table   test(time   datetime,money   int)
insert   into   test   select   '2007-01-15 ',5
insert   into   test   select   '2007-01-16 ',5
insert   into   test   select   '2007-01-17 ',5
insert   into   test   select   '2007-01-18 ',5
insert   into   test   select   '2007-01-19 ',5
insert   into   test   select   '2007-01-20 ',5
insert   into   test   select   '2007-01-21 ',5
insert   into   test   select   '2007-01-22 ',5
insert   into   test   select   '2007-01-23 ',5
insert   into   test   select   '2007-01-24 ',5
insert   into   test   select   '2007-01-25 ',5
insert   into   test   select   '2007-01-26 ',5
insert   into   test   select   '2007-01-27 ',5
insert   into   test   select   '2007-01-28 ',5
insert   into   test   select   '2007-01-29 ',5
insert   into   test   select   '2007-01-31 ',5
insert   into   test   select   '2007-02-01 ',5
insert   into   test   select   '2007-02-02 ',5
insert   into   test   select   '2007-02-03 ',5
insert   into   test   select   '2007-02-04 ',5
insert   into   test   select   '2007-02-05 ',5
insert   into   test   select   '2007-02-06 ',5
insert   into   test   select   '2007-02-07 ',5
insert   into   test   select   '2007-02-08 ',5
insert   into   test   select   '2007-02-09 ',5
insert   into   test   select   '2007-02-10 ',5
insert   into   test   select   '2007-02-11 ',5
insert   into   test   select   '2007-02-12 ',5
insert   into   test   select   '2007-02-13 ',5
insert   into   test   select   '2007-02-14 ',5
insert   into   test   select   '2007-02-15 ',5
insert   into   test   select   '2007-02-16 ',5
insert   into   test   select   '2007-02-17 ',5
insert   into   test   select   '2007-02-18 ',5
insert   into   test   select   '2007-02-19 ',5
insert   into   test   select   '2007-02-20 ',5
insert   into   test   select   '2007-02-21 ',5
insert   into   test   select   '2007-02-22 ',5
insert   into   test   select   '2007-02-23 ',5
insert   into   test   select   '2007-02-24 ',5
insert   into   test   select   '2007-02-25 ',5
insert   into   test   select   '2007-02-26 ',5
insert   into   test   select   '2007-02-27 ',5
insert   into   test   select   '2007-02-28 ',5
insert   into   test   select   '2007-03-01 ',5
insert   into   test   select   '2007-03-02 ',5
insert   into   test