随笔分类 - Mysql
摘要:https://mp.weixin.qq.com/s?__biz=MzkwNjMwMTgzMQ==&mid=2247490262&idx=1&sn=a67f610afa984ecca130a54a3be453ab&chksm=c0ebc23ef79c4b2869dea998e413c5cbea6ae
阅读全文
摘要:一、问题:查询结果无法显示test1 的全部数据 SELECT * FROM test1 a left join test2 b on b.name=a.name where b.createtimelike '%2021-03-09 00:00:00%' and b.post='Java工程师'
阅读全文
摘要:问题现象 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated column 'information_schema.PROFILING.SEQ' which is not functionally depen
阅读全文
摘要:为什么不用hash,二叉树,平衡二叉树(AVL),B-树呢?InnoDB并不支持hash索引 1.hash的时间复杂度是O(1),但是会退化为O(n),而且无法解决排序,范围查询等问题; 2.树的时间复杂度是O(log2(n));比O(n)小,所以排除hash; 3.二叉树的特点是 4.二叉树会产生
阅读全文
摘要:假如现在自增主键已经到了6,那么你再插入两条数据,然后把这两条数据删掉,然后再插入一条数据,主键就是9了。 可以通过这样解决,你要想6之后是7,可以这样; alter table dept auto_increment = 7;
阅读全文