缘由:进行update时忘了加where条件,导致所有数据全部update。。

sql:

1 update Activity set endTime=b.endTime from idj_tl_bf.dbo.Activity as b where activity.ID=b.ID

补充一个sql server dateTime类型字段加两个小时方法:

1 update Activity set endTime=DATEADD(HOUR,2,startTime) where endTime='2018-09-19 12:00:00.000' and id>50274 and id<55150 

谨以此帖,告诫自己,动服务器的时候千万别哈牛逼!!细心细心细心!!

相关文章:

  • 2022-12-23
  • 2021-10-20
  • 2021-10-20
  • 2022-12-23
  • 2021-12-14
  • 2021-10-20
猜你喜欢
  • 2022-12-23
  • 2022-02-07
  • 2022-12-23
  • 2022-01-13
  • 2022-12-23
  • 2021-10-20
  • 2022-01-13
相关资源
相似解决方案