MySQL Tutorial/Date Time Functions/MONTHNAME
An illegal date returns a NULL result:
<source lang="sql">
mysql> mysql> SELECT MONTHNAME("9"); +----------------+ | MONTHNAME("9") | +----------------+ | NULL | +----------------+ 1 row in set, 1 warning (0.00 sec) mysql></source>
MONTHNAME(date) returns the full name of the month for date.
The language used for the name is controlled by the value of the lc_time_names system variable.
<source lang="sql">
mysql> mysql> SELECT MONTHNAME("1998-02-05"); +-------------------------+ | MONTHNAME("1998-02-05") | +-------------------------+ | February | +-------------------------+ 1 row in set (0.00 sec) mysql></source>
SELECT MONTHNAME("1989-07-20");
<source lang="sql">
mysql> mysql> SELECT MONTHNAME("1989-07-20"); +-------------------------+ | MONTHNAME("1989-07-20") | +-------------------------+ | July | +-------------------------+ 1 row in set (0.02 sec) mysql> mysql></source>