mysql 距今获取一个月的数据

select * from table where createDate >=date_add('2014/10/23',interval -1 month) and createDate<='2014/10/23'

今天是2014/10/23,获取2014/9/23-2014/10/23这段时间内的数据。---> interval

 

你可能感兴趣的:(mysql)