上一页 1 2 3 4 5 6 ··· 18 下一页
摘要: 使用 Collectors.mapping 来指定 分组结果要取哪些数据 阅读全文
posted @ 2022-03-01 11:43 江湖凶险 阅读(153) 评论(0) 推荐(0) 编辑
摘要: 两种方式 1 create index idx_xxx on table(xxx); 2 alter table xxx add index idx_xxx(field); 阅读全文
posted @ 2022-01-29 11:28 江湖凶险 阅读(15) 评论(0) 推荐(0) 编辑
摘要: 1)添加列 alter table xxx add column xxx int default 0 comment 'xxx'; 指定列的位置可以使用关键字:FIRST、AFTER FIRST表示将列添加为表中的第一个,AFTER表示将列添加到某个列之后。没有before一说。 2)修改列名 al 阅读全文
posted @ 2022-01-25 17:37 江湖凶险 阅读(148) 评论(0) 推荐(0) 编辑
摘要: 1)int[][] a = new int[][]{}; 不指定行数与列数,直接初始化 {} 2)int[][] b = new int[10][]; 可以只定义行数 3)int[][] c = new int[20][20]; 指定行数与列数 4)int[]d[] = new int[5][5]; 阅读全文
posted @ 2022-01-21 11:57 江湖凶险 阅读(113) 评论(0) 推荐(0) 编辑
摘要: 借鉴别人的图示,直观清晰 阅读全文
posted @ 2022-01-20 11:51 江湖凶险 阅读(21) 评论(0) 推荐(0) 编辑
摘要: 1) int a = 0b10111; 0b开头表示二进制数 2) int b = 0127; 0开通表示8进制数 3) int c 0x187Fde; 0x或者0X开头表示16机制数 阅读全文
posted @ 2022-01-20 11:20 江湖凶险 阅读(492) 评论(0) 推荐(0) 编辑
摘要: timestampdiff(unit, param1, param2) 。其中unit可以是 minute, hour, second, day等,计算方式是 param2 - param1。 获取 date_sub / date_add(param, interval xxx unit),将日期参 阅读全文
posted @ 2022-01-18 11:25 江湖凶险 阅读(33) 评论(0) 推荐(0) 编辑
摘要: mysql日期处理 select DATE_ADD(field, interval xxx day|month|year) from xxx; DATE_ADD 对日期进行加运算,DATE_SUB 对日期进行减运算 例: select date_add(create_time, interval 1 阅读全文
posted @ 2022-01-17 15:30 江湖凶险 阅读(33) 评论(0) 推荐(0) 编辑
摘要: distinct多个字段 比如查看用户每天登陆app的情况, select distinct user_id, date from xxx; 查询结果可能为: 1001 2022-01-11 1001 2022-01-16 1002 2022-01-06 1002 2022-01-12 阅读全文
posted @ 2022-01-17 15:23 江湖凶险 阅读(125) 评论(0) 推荐(0) 编辑
摘要: select day(date), month(date), year(date) from user; day, month, year取出的是数字 阅读全文
posted @ 2022-01-17 11:19 江湖凶险 阅读(428) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 18 下一页