From the course: Oracle Database 12c: Basic SQL
Unlock this course with a free trial
Join today to access over 25,300 courses taught by industry experts.
Using ADD_MONTHS - Oracle Database Tutorial
From the course: Oracle Database 12c: Basic SQL
Using ADD_MONTHS
- [Instructor] @_month is a date function in Oracle that allows us add a specified number of months to a specific date. Let's see it in action. Let's select the current sysdate as well as add_months supplying sysdate as the first paramenter and one as the second parameter, but let's not stop here. And type add_months again specifying sysdate, but this time the second parameter will be a value of two, and one more time, add_months, leave sysdate as the first parameter, and this time a value of three as the second parameter from dual. Running this query will return us the current sysdate, the current sysdate plus one month, current sysdate plus two months, and the current sysdate plus three months. So as you can see using add_months you can easily add additional months to a date value. The date value, which is the first argument to the function, can either be dynamically generated, such as when using sysdate, or…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
-
Introduction to functions1m 39s
-
(Locked)
Using SUBSTRING, LENGTH, and CONCAT2m 50s
-
(Locked)
Using LENGTH1m 4s
-
(Locked)
Using CONCAT4m 48s
-
(Locked)
Using LOWER and UPPER2m 44s
-
(Locked)
Using INSTR4m 32s
-
(Locked)
Using RPAD and LPAD3m 31s
-
(Locked)
Using TO_CHAR to convert numbers1m 34s
-
(Locked)
Using TO_CHAR to format DATE values2m 59s
-
(Locked)
Using TO_CHAR to filter DATE values1m 57s
-
(Locked)
The special Oracle DUAL table1m 18s
-
(Locked)
Using ROUND1m 15s
-
(Locked)
Using TRUNC1m 36s
-
(Locked)
Using SYSDATE1m 59s
-
(Locked)
Using SYSTIMESTAMP1m 37s
-
(Locked)
Using MONTHS_BETWEEN3m 2s
-
(Locked)
Using ADD_MONTHS1m 17s
-
-
-
-
-
-