- 博客(8)
- 收藏
- 关注
原创 mysql查询近几日之内的数据
这里查询的是近一周的数据例子: SELECT * FROM cnpc_employee WHERE cnpc_employee.status = 0 AND cnpc_employee.hose != '12356' and cnpc_employee.on_job = #{onJob}and DATE_SUB(CURDATE(), INTERVAL 7 DAY) <![CDATA[ <= ]]> date(departure_time)注意:7
2020-08-05 10:34:19 183
转载 find_in_set/like/in区别
mysql中这三个的区别1.FIND_IN_SET2.like3.infind_in_set()和in的区别:CREATE TABLE `tb_test` ( `id` int(8) NOT NULL auto_increment, `name` varchar(255) NOT NULL, `list` varchar(255) NOT NULL, PRIMARY KEY (`id`));INSERT INTO `tb_test` VALUES (1, 'name', 'd
2020-08-04 17:31:34 167
原创 mysql单表统计不同类型计数实例
mysql单表统计不同类型计数实例SELECTcount(*) as total,ifnull(sum(case when sex = ‘男’ then 1 else 0 end),0) as man,ifnull(sum(case when sex = ‘女’ then 1 else 0 end),0) as woman,ifnull(sum(case when political_status = ‘党员’ then 1 else 0 end),0) as communist,ifnull
2020-08-04 14:23:46 547
原创 mysql根据出生日期换算年龄
mysql根据出生日期换算年龄例如:SELECT TIMESTAMPDIFF(YEAR,e.birth,NOW()) as age FROM cnpc_employee eWHERE e.id=6785输出结果:
2020-08-04 10:47:20 652
原创 程序包com.sun.xml......不存在
Springboot项目打包的时候出现以下错误[ERROR] /E:/Git/ndfs_oa_ding/src/main/java/com/ityuexun/ndfs_oa_ding/annotation/CheckLoginAspect.java:[8,45] 程序包com.sun.xml.internal.ws.api.streaming不存在
2020-05-12 09:35:14 1412 1
原创 fastjson处理json封装到实体类中
fastjson处理json字符串封装到实体类package com.ityuexun.ndfs_oa_ding.pojo.userdinglogin;import com.baomidou.mybatisplus.enums.IdType;import com.baomidou.mybatisplus.annotations.TableId;import com.baomidou.my...
2020-04-26 12:15:06 680
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人