I need to all of timestamps in a column the same amount. I want to write an sql statement like:
更新某表,将timecol列增加4个月:update sometable set timecol = timecol + <4 months>;
I need to all of timestamps in a column the same amount. I want to write an sql statement like:
更新某表,将timecol列增加4个月:update sometable set timecol = timecol + <4 months>;
update sometable set timecol = add_months(timecol,4);
查看文档。
update sometable set timecol = timecol + interval 4 month;
奇怪的是,在Oracle文档中我找不到这个方法,但是它在我的Oracle XE安装中可以正常使用。它与PostgreSQL的方法非常接近,我相信它是SQL标准的一部分。