Usage of the oracle add_months Function

Source: Internet
Author: User

The usage of the oracle add_months function is explained in detail using the oracle add_months function, you can get a certain time before or after n months, if you have encountered similar problems before, take a look. Www.2cto.com if you need to retrieve data from the previous month and perform this operation every day, you need to change the time each time, which is indeed very troublesome, so I thought of the oracle add_months function. The oracle add_months function: oracle add_months (time, months) function can get the time before or after a certain time, such as select add_months (sysdate, -6) from dual; the query result is select add_months (sysdate, 6) from dual; the query result is www.2cto.com my examle: select distinct (t. mobile) from twaplogon t where to_char (t. logontime, 'yyyy-mm') = to_char (add_months (sysd Ate,-1), 'yyyy-mm') and above are the usage methods of the oracle add_months function.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.