/*
6就是要查询的月份。
1970-01-01 8:00:00 是固定写死的。
birthday 是字段名。
*/
select user_id from users where month(date_add('1970-01-01 8:00:00',interval birthday second))= 6;
/*
6就是要查询的月份。
1970-01-01 8:00:00 是固定写死的。
birthday 是字段名。
*/
select user_id from users where month(date_add('1970-01-01 8:00:00',interval birthday second))= 6;