SELECT birthday FROM table1 WHERE date_format(birthday,'%Y-%m-%d')>= '2008-05-01' and date_format(birthday,'%Y-%m-%d')< '2008-06-01'
这句肯定行
SELECT birthday FROM table1 WHERE date_format(birthday,'%Y-%m')>= '2008-05' and date_format(birthday,'%Y-%m-%d')< '2008-06'
这句就不确定了 我没Mysql 不能试 如果行的话别忘了贴出来。
SELECT birthday FROM table1 WHERE birthday>=2008:05 AND birthday<=2008:06
select * from table1 where birthday between '2008-5-1' and '2008-6-1'
介绍sql语句如何使用函数