随笔分类 -  MySQL

摘要:MySQL 对于tinyint字段如果设置为tinyint(1),那么对应在数据库中存储的就是0或者1,但是java层面对应的字段应该要设置为boolean类型的值。 阅读全文
posted @ 2022-07-03 15:32 ethanSung 阅读(29) 评论(0) 推荐(0)
摘要:mysql数据库主键不是事务性质的,所以当没有提交事务时,主键的自动递增是不会回滚的,之所以不把主键自增加入到事务管理,可以看一下例子 //transaction1 begain transaction insert into A commit //transaction2 begain trans 阅读全文
posted @ 2021-10-27 22:46 ethanSung 阅读(324) 评论(0) 推荐(0)
摘要:select * from (select re.recruit_name, re.emp_no, re.psDeptname, re.branch_name2, re.branch_name3, re.branch_name4, to_char(ci.check_time, 'yyyy/mm/dd 阅读全文
posted @ 2021-09-14 18:44 ethanSung 阅读(63) 评论(0) 推荐(0)
摘要:1.什么是索引 - 官方定义: 一种帮助mysql提高查询效率的数据结构 - 索引的优点: 1、大大加快数据查询速度 - 索引的缺点: 1、维护索引需要耗费数据库资源 2、索引需要占用磁盘空间 3、当对表的数据进行增删改的时候,因为要维护索引,速度会受到影响 2.索引分类 疑问:不同引擎的差异? - 阅读全文
posted @ 2021-07-03 15:13 ethanSung 阅读(254) 评论(0) 推荐(0)