bugl
bugl
HomeLearnPatternsPathsSearch
HomeLearnPatternsPathsSearch

Loading lesson path

Learn/SQL/SQL References
SQL•SQL References

MySQL PERIOD_ADD() Function

Flash cards

Review the key moves

1/4
Core idea

What is the main idea behind MySQL PERIOD_ADD() Function?

Lesson checks

Practice each idea before moving on

Short Mimo-style checks built from this lesson's code, terms, and sequence.

1Quick choice

Which statement best captures the main point of this lesson?

2Fill blank

Complete the missing token from the example code.

___ PERIOD_ADD(201703, 5);
3Order

Put the learning moves in the order that makes the concept easiest to apply.

The PERIOD_ADD() function adds a specified number of months to a period.
Definition and Usage
MySQL PERIOD_ADD() Function

Example

SELECT PERIOD_ADD(201703, 5);

Definition and Usage

The PERIOD_ADD() function adds a specified number of months to a period.

The PERIOD_ADD() function will return the result formatted as YYYYMM.

Syntax

PERIOD_ADD(
period
,
number
)

Parameter Values

ParameterDescription
periodRequired. A period. Format: YYMM or YYYYMM
numberRequired. The number of months to add to period . Both positive and negative values are allowed

Technical Details

Works in:From MySQL 4.0

Previous

MySQL NOW() Function

Next

MySQL PERIOD_DIFF() Function