会员
周边
新闻
博问
闪存
赞助商
YouClaw
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
【MapSheep】
[好记性不如烂笔头]
博客园
首页
新随笔
新文章
联系
订阅
管理
上一页
1
···
9
10
11
12
13
14
15
16
17
···
35
下一页
2024年7月15日
MyBatis-Plus updateById方法更新不了date类型的字段为null 完美解决方法
摘要: 1.在需要给该字段赋值为null的上面加一行注解 @TableField(strategy = FieldStrategy.IGNORED)
阅读全文
posted @ 2024-07-15 14:41 (Play)
阅读(385)
评论(0)
推荐(0)
2024年3月14日
MySQL dual表(自带表 使用)
摘要: MySQL dual(自带表) select '张三' as '变量1', (select s_name from Student where s_sex = '男' LIMIT 1) as '变量2', 2 as '变量3', null from dual;
阅读全文
posted @ 2024-03-14 11:55 (Play)
阅读(78)
评论(0)
推荐(0)
2024年1月23日
Java resultset判断mysql表是否存在
摘要: import java.sql.*; public class CheckTableExistence { public static void main(String[] args) throws SQLException { String url = "jdbc:mysql://localhos
阅读全文
posted @ 2024-01-23 16:18 (Play)
阅读(91)
评论(0)
推荐(0)
2024年1月18日
mysql 根据 /分割
摘要: 其中,column_name为要分割的列名,table_name为表名。这条查询将会返回每个记录中最后一个'/'之前的部分作为结果。 -1 取 ‘/’ 之后 0 取 '/' 之前 SELECT SUBSTRING_INDEX(column_name, '/', -1) AS result FROM
阅读全文
posted @ 2024-01-18 10:17 (Play)
阅读(62)
评论(0)
推荐(0)
2024年1月12日
MyBatisPlus(IdType.INPUT)
摘要: IdType.AUTO 主键自增,系统分配,不需要手动输入,但需要设置 mysql auto_increment IdType.NONE 未设置主键 IdType.INPUT 需要自己输入 主键值**(配合MySQL int类型自增,亲测可用)** IdType.ASSIGN_ID 系统分配 ID,
阅读全文
posted @ 2024-01-12 17:23 (Play)
阅读(1133)
评论(0)
推荐(0)
2023年11月23日
MySQL中count()、sum()区别
摘要: 1、count0函数 里面的参数是列名的的时候,会计算有值项的次数sum(函数 里面的参数是列名的时候,会计算 列名的值的和。2、两个函数在 记录的列名的值为空或者是null时,都不会去统计即count(列名)和sum(列名) 都不计入这条记录 3、count()可以计算出行数,count (1)也
阅读全文
posted @ 2023-11-23 16:35 (Play)
阅读(502)
评论(0)
推荐(0)
2023年11月7日
Java Collectors.toMap当value为null时报空指针异常完美解决方案
摘要: Map<String, String> resultMap = map.entrySet().stream().collect(Collectors.toMap(entry -> entry.getKey(), entry -> Optional.ofNullable(entry.getValue(
阅读全文
posted @ 2023-11-07 10:28 (Play)
阅读(904)
评论(0)
推荐(0)
2023年11月1日
跟着狂神聊聊POI和EasyExcel
摘要: 参考网址 点击跳转 示例 如图
阅读全文
posted @ 2023-11-01 17:24 (Play)
阅读(28)
评论(0)
推荐(0)
2023年10月31日
Java 通过collectors.groupingBy根据某个字段统计
摘要: 要使用Collectors.groupingBy根据某个字段统计,你可以通过提供一个函数来指定分组的条件。 假设你有一个包含Person对象的列表,每个对象都有age字段表示年龄,你想要根据年龄分组,并统计每个年龄组的人数。以下是一个使用Collectors.groupingBy的示例代码: imp
阅读全文
posted @ 2023-10-31 14:53 (Play)
阅读(551)
评论(0)
推荐(0)
element cannot be mapped to a null key的解决方法
摘要: 目录报错:分析解决方案 报错: 日志 ERROR [o.a.c.c.C.[.[.[/sa].[dispatcherServlet]] - Servlet.service() for servlet [dispatcherServlet] in context with path [/sa] thre
阅读全文
posted @ 2023-10-31 11:58 (Play)
阅读(1762)
评论(0)
推荐(1)
上一页
1
···
9
10
11
12
13
14
15
16
17
···
35
下一页