發表文章

目前顯示的是 12月, 2018的文章

mysql查询特定时间段内的数据

转载自: https://blog.csdn.net/EightSwords/article/details/79702101 SET FOREIGN_KEY_CHECKS= 0 ; -- ---------------------------- -- Table structure for t_user -- ---------------------------- DROP TABLE IF EXISTS `t_user` ; CREATE TABLE `t_user` ( `userId` bigint( 20 ) NOT NULL , `fullName` varchar ( 64 ) NOT NULL , `userType` varchar ( 16 ) NOT NULL , `addedTime` datetime NOT NULL , PRIMARY KEY ( `userId` ) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- ---------------------------- -- Records of t_user -- ---------------------------- INSERT INTO `t_user` VALUES ( '1' , '爽爽' , '普通' , '2018-01-21 10:20:09' ); INSERT INTO `t_user` VALUES ( '2' , '贵贵' , '普通' , '2017-11-06 10:20:22' ); INSERT INTO `t_user` VALUES ( '3' , '芬芬' , 'vip' , '2017-11-13 10:20:42' ); INSERT INTO `t_user` VALUES ( '4' , '思思' ,