
Sql
书之岁华
这个作者很懒,什么都没留下…
展开
-
数据库大数据量表SQL语句执行耗时久
发时达原创 2020-05-13 10:24:44 · 854 阅读 · 1 评论 -
Sql 行转列
1、未转换前2、 行转列函数:UNPIVOT()SELECT * FROM (select std0, std1,std2,std3,std4,std5,std6,std9 from table t) UNPIVOT("value" FOR "name" IN(std0 as '哈哈1',std1 as '哈哈2',std2 as '哈哈3',std3 as '哈哈4',std4 as '哈...原创 2019-10-18 10:23:53 · 166 阅读 · 0 评论 -
内连接(自然连接)、左/右/全外连接、自身连接、交叉连接、联合查询
内连接内连接也叫连接,自然连接。内连接是从结果表中删除与其他被连接表中没有匹配行的所有行,所以内连接可能会丢失信息。select fieldlist from table1 [inner] join table2 on table1.column=table2.column...转载 2018-10-26 09:17:59 · 1224 阅读 · 0 评论 -
SpringMVC前端字段多选查询(sql in 关键字)
1、jsp<div class="col-md-3"> <sys:codeselectmul name="pdjg" optionsList="${gfunc:getSysCode('pdjg') }" cssClass="bs-select form-control">原创 2018-12-14 11:53:46 · 1092 阅读 · 0 评论 -
批处理(mybatis删除、插入)
1、daovoid batchDelete(Integer[] ids);2、mapper<delete id="batchDelete"> delete from t_user where id in <foreach collection="array" item=&a原创 2018-12-18 09:34:32 · 1779 阅读 · 0 评论