摘要: 阅读全文
posted @ 2017-08-02 17:57 xushukui 阅读(224) 评论(0) 推荐(0) 编辑
摘要: 用到GROUP BY 语句查询时com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Expression 2 of SELECT list is not in GROUP BY clause and contains nonaggre 阅读全文
posted @ 2017-08-02 15:41 xushukui 阅读(120) 评论(0) 推荐(0) 编辑
摘要: 由于MySQL设计时不支持full outer join, 所以如果有全连接需求时,需要一点小技巧来实现。 假设有两个表t1,t2 full outer join 的效果和下面的效果一样: SELECT FROM t1 LEFT JOIN t2 ON t1.id = t2.id UNION SELE 阅读全文
posted @ 2017-08-02 09:03 xushukui 阅读(514) 评论(0) 推荐(0) 编辑