![](https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
mysql
翻过这座山,你就能看见下座山
这个作者很懒,什么都没留下…
展开
-
mysql 8.0 以上 以上版本使用 group by 会报错 only_full_group_by
mysql 8.0 以上版本使用 group by 会报错Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated column ‘information_schema.PROFILING.SEQ’ which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sq..原创 2020-06-23 15:52:44 · 713 阅读 · 2 评论 -
mysql create 表 alert 字段 默认值与注释
ALTER TABLE table_info add user_typeINT default 0 COMMENT "用户类型";CREATE TABLE `表名` ( `id` bigint NOT NULL COMMENT '主键', `user_id` bigint NOT NULL COMMENT '用户id', `account_type` INT DEFAULT NULL COMMENT '账户类型(0:普通,1:冻结)', `balance` decimal(16,...原创 2020-06-02 14:55:22 · 1506 阅读 · 0 评论 -
mysql 根据状态不同按不同规则排序
ORDER BY CASE WHEN 1=1 THEN p.`status` END DESC , CASE WHEN p.`status`='还款中' THEN p.`paytime` END ASC , CASE WHEN p.`status`!='还款中' THEN p.`paytime` END DESC首先 当 1=1 按照状态排第一次序,然后 在排序好的队列中,当状态是还...原创 2019-11-27 19:46:39 · 1516 阅读 · 0 评论