[{"title":"( 33 个子文件 13KB ) 常用的mysql语句写法","children":[{"title":"demo","children":[{"title":"使用一条sql联合查询不同的数据库.sql <span style='color:#111;'> 252B </span>","children":null,"spread":false},{"title":"3新增数据.sql <span style='color:#111;'> 2.69KB </span>","children":null,"spread":false},{"title":"in-- in(1,2).sql <span style='color:#111;'> 50B </span>","children":null,"spread":false},{"title":"count --- select COUNT(星号) as 次数 , 字段qb,统计每次字段qb查询的次数--- 注意需要加上分组GROUP BY.sql <span style='color:#111;'> 72B </span>","children":null,"spread":false},{"title":"count-- having GROUP BY 字段qb count(字段qb)查询某个字段重复数据在1次以上.sql <span style='color:#111;'> 72B </span>","children":null,"spread":false},{"title":"not in -- NOT IN ( SELECT c.id cid FROM c )不等于查询出来的select.sql <span style='color:#111;'> 74B </span>","children":null,"spread":false},{"title":"2, EXISTS 解决重复插入.sql <span style='color:#111;'> 804B </span>","children":null,"spread":false},{"title":"case when--复杂的多个when使用.sql <span style='color:#111;'> 303B </span>","children":null,"spread":false},{"title":"左连接测试笛卡尔积,a,b,c.sql <span style='color:#111;'> 103B </span>","children":null,"spread":false},{"title":"1, EXISTS --不满足EXISTS后面的select条件,则前面的select不执行,反之执行.sql <span style='color:#111;'> 71B </span>","children":null,"spread":false},{"title":"测试a,b,c笛卡尔积的条件a.id=b.id AND b.id=c.id.sql <span style='color:#111;'> 88B </span>","children":null,"spread":false},{"title":"case when --- 行转列 行级数据有重复,有问题.sql <span style='color:#111;'> 200B </span>","children":null,"spread":false},{"title":"行转列 ---case when.sql <span style='color:#111;'> 58B </span>","children":null,"spread":false},{"title":"case-when --简单是使用case when,只有一个when的使用.sql <span style='color:#111;'> 200B </span>","children":null,"spread":false},{"title":"3-2修改数据.sql <span style='color:#111;'> 512B </span>","children":null,"spread":false},{"title":"2-1, 唯一索引解决重复插入.sql <span style='color:#111;'> 488B </span>","children":null,"spread":false},{"title":"左连接测试笛卡尔积where条件is not NULL.sql <span style='color:#111;'> 139B </span>","children":null,"spread":false},{"title":"1-2. not EXISTS --不满足EXISTS后面的select条件,则执行前面的select数据,反之不执行.sql <span style='color:#111;'> 804B </span>","children":null,"spread":false},{"title":"LIMIT --分页查询.sql <span style='color:#111;'> 124B </span>","children":null,"spread":false},{"title":"in-- 两个select,where中的in已某个select结果来做筛选条件.sql <span style='color:#111;'> 67B </span>","children":null,"spread":false},{"title":"not EXISTS --不满足EXISTS后面的select条件,则执行前面的select数据.sql <span style='color:#111;'> 76B </span>","children":null,"spread":false},{"title":"union表示ooo.qb=22数据,或者ooo.qb=22数据,去除重复数据---走索引.sql <span style='color:#111;'> 101B </span>","children":null,"spread":false},{"title":"注意是在mybatisdemo库中的表数据 表1 LEFT JOIN (select ) 表23 表1.id=表23.a使用方式.sql <span style='color:#111;'> 697B </span>","children":null,"spread":false},{"title":"3-1删除数据.sql <span style='color:#111;'> 349B </span>","children":null,"spread":false},{"title":"OR表示ooo.qb=22数据,或者ooo.qb=22数据,不去除重复数据--不走索引.sql <span style='color:#111;'> 56B </span>","children":null,"spread":false},{"title":"count(星号)统计表里有多少条数据.sql <span style='color:#111;'> 49B </span>","children":null,"spread":false},{"title":"union all替换OR表示ooo.qb=22数据,或者ooo.qb=22数据,不去除重复数据--走索引.sql <span style='color:#111;'> 106B </span>","children":null,"spread":false},{"title":"左连接笛卡尔积WHERE 条件is null.sql <span style='color:#111;'> 135B </span>","children":null,"spread":false},{"title":"测试a,b,c笛卡尔积.sql <span style='color:#111;'> 53B </span>","children":null,"spread":false},{"title":"3新增字段并且添加字段注释.sql <span style='color:#111;'> 875B </span>","children":null,"spread":false},{"title":"测试全表的a,b,c笛卡尔积.sql <span style='color:#111;'> 45B </span>","children":null,"spread":false},{"title":"1-1, EXISTS --满足EXISTS后面的select条件,则执行前面的select数据,反之不执行.sql <span style='color:#111;'> 1.53KB </span>","children":null,"spread":false},{"title":"行转列--- PIVOT.sql <span style='color:#111;'> 24B </span>","children":null,"spread":false}],"spread":false}],"spread":true}]