Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在 Oracle 中有一个日期字段,我需要更新日期字段,以便它在一个月前的同一日期而不更改日期。例如:
10-09-2013 should be 10-08-2013 13-05-2013 should be 13-04-2013 02-02-2013 should be 02-01-2013
我曾想过
update my_table_name set my_date_field = my_date_field-30
但并非所有月份都有 30 天。请帮帮我
UPDATE My_table_name SET my_date_field = ADD_MONTHS( my_date_field, -1)