SQLServer 把某日期更新到某天
程序员文章站
2022-05-01 20:53:07
例: update cyj_cx_dwjl set xrsj=DATEADD(day, DATEDIFF(day, xrsj, GETDATE()), XRSJ) where CONVERT(VARCHAR(10),xrsj,20)='2019-04-26'; ......
例:
update cyj_cx_dwjl set xrsj=dateadd(day, datediff(day, xrsj, getdate()), xrsj) where
convert(varchar(10),xrsj,20)='2019-04-26';
上一篇: Redis主从复制实现