27,579
社区成员
发帖
与我相关
我的任务
分享
create table #t(a varchar(1),b varchar(1),c datetime)
insert into #t (c)values('2010-03-26')
insert into #t (c)values('2010-03-27')
update #t
set a='1',b='2'
where c>='2010-03-26' and c<='2010-03-27'
select * from #t
a b c
---- ---- ------------------------------------------------------
1 2 2010-03-26 00:00:00.000
1 2 2010-03-27 00:00:00.000
(所影响的行数为 2 行)
update t
set a='1',b='2'
where c between '2010-03-26' and '2010-03-27'
update t
set a='1',b='2'
where c between '2010-03-26' and '2010-03-27'