日期:2014-05-16  浏览次数:20689 次

请教个MYSQL数据库查询语句问题
数据库day有2个字段表示时间
month:year-month 如:2008-05
date:day 如:12
现在我要select *某年某月某日以后,某年某月某日以前的数据,请问这个SQL怎么写啊?

------解决方案--------------------


SQL code
select *
from yourtable
where concat(`year-month`,'-',`day`) between '2008-01-20' and '2008-02-19'