随笔分类 - mysql
mysql索引学习
摘要:sql表:https://blog.csdn.net/weixin_46002478/article/details/109158249 explain id:相同从上到下执行,如果是子查询 id越大优先级越高select-type:显示查询使用了何种类型:type:显示查询使用了何种类型: eq_
阅读全文
count函数
摘要:COUNT(1):统计不为NULL 的记录。COUNT(*):统计所有的记录(包括NULL)。 COUNT(字段):统计该"字段"不为NULL 的记录。1.如果这个字段是定义为not null的话,一行行地从记录里面读出这个字段,判断不能为null,按行累加。2.如果这个字段定义允许为null的话,
阅读全文
多表联查课程发布信息
摘要:1.封装实体类封装数据库查询的课程信息 @Data public class CoursePublishVo { private String title; private String cover; private Integer lessonNum; private String subject
阅读全文
mysql连接数据库
摘要:spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driverspring.datasource.url=jdbc:mysql://localhost:3306/mybatis_plus?serverTimezone=GMT%2B8sprin
阅读全文