把2009改成2019 月份和日不变
不清楚你是什么类型的数据库,以oracle为例:
update table set d_cb = add_months(d_cb,120)
where d_cb between to_date('2009-01-01 00:00:00','yyyy-mm-dd hh24:mi:ss')
and to_date('2009-01-01 23:59:59','yyyy-mm-dd hh24:mi:ss')
mysql:
update 表名 set 需要修改的字段名 = replace('需要修改的字段名','需要替换的字符','替换成什么字符')