sql批量讓日期增加2年的語句
在做項目中應(yīng)該經(jīng)常用得到的
大家可以直接復(fù)制
可以進行批量修改!
select s1,s8,s12 from hy where s1 in('TSA12099571','TSA12100589','TSA12100590','TSA12100543','TSA12100540','TSA12100036','TSA12110161','TSA12099278')
update hy set s8 = DATEADD(YEAR, 2, s8) where s1 in('TSA12099571','TSA12100589','TSA12100590','TSA12100543','TSA12100540','TSA12100036','TSA12110161','TSA12099278')