In addition to Weibo, there is also WeChat
Please pay attention

WeChat public account
Shulou
2025-11-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
1, function: ADD_MONTHS (DATE,INTEGER)-adds the specified time to a few months later
For example:
SELECT ADD_MONTHS (SYSDATE, 1) FROM DUAL;-the current time plus 1 month, that is, one month later. SELECT ADD_MONTHS (SYSDATE,-1) FROM DUAL;-the current time minus 1 month, that is, the time of one month ago.
2. Add or subtract the SYSDATE for one time.
For example:
SELECT SYSDATE + 1 FROM DUAL;-the current time plus 1 day, that is, the time after one day (the 1 unit here is the day). SELECT SYSDATE-1 FROM DUAL;-the current time minus 1 day, that is, the time one day ago. SELECT SYSDATE + 1 take 24 FROM DUAL;-the current time plus 1 hour, that is, the time after one hour. SELECT SYSDATE + 1-24-60 FROM DUAL;-current time plus 1 minute, that is, one minute later. SELECT SYSDATE + 1max 24 FROM DUAL; 60 FROM DUAL;-the current time plus 1 second, that is, the time after one second.
By the same token, if it is minus (-), it will push forward a set time.
3,INTERVAL
The usage of INTERVAL is:
SELECT SYSDATE + /-INTERVAL 'N'TIMEUNIT FROM DUAL
Description:
N: numbers, that is, how much time to add or subtract, there must be single quotation marks.
TIMEUNIT is: unit of time. The preferred value is YEAR,MONTH,DAY,HOUR,MINUTE,SECOND.
For example:
SELECT SYSDATE + INTERVAL'1' DAY FROM DUAL;-- current time plus 1 month, that is, one month later. SELECT SYSDATE-INTERVAL'1' HOUR FROM DUAL;-- current time minus 1 hour, that is, one hour ago.
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.

The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope





About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.