Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

MYQL Month ,Year list

Posted on 2012-03-27
4
Medium Priority
?
582 Views
Last Modified: 2012-03-29
I want the output like the below rows in mysql.The logic is from current month year to next 20 month year.

March 2012
April 2012
May 2012
June 2012
.....
....
December 2013
0
Comment
Question by:dynamicweb09
4 Comments
 
LVL 9

Expert Comment

by:OCDan
ID: 37775259
Whats your starting data?
0
 
LVL 24

Assisted Solution

by:johanntagle
johanntagle earned 1000 total points
ID: 37775271
See http://stackoverflow.com/questions/9511409/creating-a-list-of-month-names-between-two-dates-in-mysql just change the start and end dates and also change MonthName(aDate) to date_format(aDate, '%M %Y')
0
 
LVL 1

Author Comment

by:dynamicweb09
ID: 37775281
my starting data is from current month and year. and we need next 20 month and year.everything is dynamic.
0
 
LVL 20

Accepted Solution

by:
BuggyCoder earned 1000 total points
ID: 37775407
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this series, we will discuss common questions received as a database Solutions Engineer at Percona. In this role, we speak with a wide array of MySQL and MongoDB users responsible for both extremely large and complex environments to smaller singl…
By, Vadim Tkachenko. In this article we’ll look at ClickHouse on its one year anniversary.
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…

885 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question