码迷,mamicode.com
首页 > 数据库 > 详细

【MySQL】only_full_group_by 绕过

时间:2020-04-30 17:32:13      阅读:78      评论:0      收藏:0      [点我收藏+]

标签:group   follow   and   where   bip   blog   json   logs   max   

SELECT origin.*,tmp.dbn_name_list FROM {ConstDatabaseMeta.DBMeta.DatabaseName}.{ConstDatabaseMeta.DBMeta.DDBMetaPolicy} AS origin, (SELECT MAX(id) AS id,name, JSON_ARRAYAGG(dbn_name) AS dbn_name_list FROM {ConstDatabaseMeta.DBMeta.DatabaseName}.{ConstDatabaseMeta.DBMeta.DDBMetaPolicy} WHERE ddb_ip=‘{ip}‘ AND dbi_port={dbiPort} GROUP BY name) AS tmp WHERE origin.id = t.id

参考

https://www.jianshu.com/p/7f532985ff39

https://www.cnblogs.com/xzjf/p/8466858.html

【MySQL】only_full_group_by 绕过

标签:group   follow   and   where   bip   blog   json   logs   max   

原文地址:https://blog.51cto.com/l0vesql/2491728

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!