In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-26 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Today, let's briefly summarize the add_months function:
The add_months function mainly operates on the date function and increases the date month by month in the process of data query, in the form of:
Add_months (date,int); where the first parameter is the date and the second is the monthly increase, for example:
Add_months (sysdate,2): this is the time two months after the current date.
For example, it indicates the time after 2 months:
SQL > select add_months (sysdate,2) from dual; ADD_MONTHS (SYSDATE,+2)-2012-5-16 02:30:47
For the time 2 months ago, you can use the following statement
SQL > select add_months (sysdate,-2) from dual;ADD_MONTHS (SYSDATE,-2)-2011-11-16 02:32:39
If the first parameter, the current date, is a specified specific date, then the date needs to be converted using to_date ('20190101 recording journal yyyymmdd`), as follows:
Select * from tb_user where create_date_time > to_date ('20190101') and create_date_timeadd_months (time,2*12)
Summary
The above is the summary of the add_months () function and usage in oracle introduced by the editor. I hope it will be helpful to you. If you have any questions, please leave me a message and the editor will reply you in time. Thank you very much for your support to the website!
If you think this article is helpful to you, you are welcome to reprint it, please indicate the source, thank you!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
VpSBt5Ub8LbpWX1tnzHFOV6ejwzov/VliqLXau21e6vTPdfl/McOz4ckw62Dr771gAgG+BhGy37x8dfzflXwGf7Vjt7Hcxvw1365
© 2024 shulou.com SLNews company. All rights reserved.