2017年8月25日

摘要: 1.select 语句的执行顺序 SELECT a.id,a.`product_name`,a.`agreement_copies` i,b.id as statusId from `opmp_product_info` a left join `total_status` b on a.`id`= 阅读全文

posted @ 2017-08-25 15:37 冠军33 阅读(722) 评论(0) 推荐(0) 编辑


2017年5月18日

摘要: 在MyBatis传入List参数时,MyBatis报错:nested exception is org.apache.ibatis.binding.BindingException: Parameter 'idList' not found. Available parameters are [co 阅读全文

posted @ 2017-05-18 19:26 冠军33 阅读(124852) 评论(1) 推荐(8) 编辑


2017年5月5日

摘要: 在SQL中order by null有什么用吗?这是我在一次面试时面试官问我的问题,当时我是懵的。他让我猜一下,我说不排序?没想到被我猜对了 不排序你就别用order by啊!为什么要用order by null? 我们看一下下面这条SQL分析 explain select * from sc gr 阅读全文

posted @ 2017-05-05 18:30 冠军33 阅读(929) 评论(0) 推荐(0) 编辑

摘要: SELECT * FROM student a LEFT JOIN sc b ON a.Sid = b.Sid AND a.Sname="赵雷" 结果:(left join 左连接,左表所有数据 拼接 右表符合on条件的数据。on后用and连接,‘a.Sid = b.Sid AND a.Sname= 阅读全文

posted @ 2017-05-05 17:41 冠军33 阅读(21537) 评论(3) 推荐(3) 编辑

摘要: student表 sc 表 首先where条件a.Sid = b.Sid 查询 SELECT * FROM student a,sc b WHERE a.Sid = b.Sid GROUP BY a.Sname ORDER BY a.Sid 结果:(from后用‘,’分隔,两表inner join 阅读全文

posted @ 2017-05-05 17:29 冠军33 阅读(12995) 评论(0) 推荐(0) 编辑


Copyright © 2024 冠军33
Powered by .NET 8.0 on Kubernetes