Mysql从一个月的字符串列中选择下个月

时间:2012-07-06 16:00:38

标签: mysql

如果我有一个名为“month”的列,其中包含实际月份名称的字符串表示,那么如何从下个月选择记录?

SELECT * FROM minutes WHERE year = YEAR(CURDATE()) AND month = 

1 个答案:

答案 0 :(得分:0)

明白了,没关系:

SELECT * FROM  minutes WHERE year = YEAR(CURDATE()) AND month = MONTHNAME(now() + INTERVAL 1 MONTH)