![](https://img-blog.csdnimg.cn/20201014180756913.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
mysql
文章平均质量分 93
BUG记录机
记录一些bug问题,一部分技术code,还有一些任何我想要记录的东西。。
展开
-
mysql循环执行sql(存储过程)
在网上搜到的全是这种,执行不了我的版本5.7.*红框部分 报错简单点-- 删除存储过程DROP PROCEDURE IF EXISTS proc_initData;-- 1、创建CREATE PROCEDURE proc_initData()BEGINDECLARE i INT DEFAULT 0;WHILE i<=1000 DO yourSql;SET i = i+1;END WHILE;END -- 2、调用CALL proc_initData();原创 2020-12-30 10:30:37 · 5394 阅读 · 0 评论 -
mysql按半小时分组
mysql分组查询(按每小时)这个很简单,只要字段是时间类型select DATE_FORMAT( tf.curr_time ,'%H') as dataStartTimefrom t_fundjour tf group by dataStartTimemysql分组查询(按半小时)逻辑:就需要用到分钟0-30分钟属于AM10:00,30-59分钟属于AM10:30select DATE_FORMAT( concat(date(tf.curr_time ),' ',hour(tf.curr_原创 2020-09-02 09:54:15 · 8750 阅读 · 0 评论 -
mysql杂谈
版本8.0.17 win64,之前也试过5.*版本大致问题如下配置文件my.ini#1. 在路径:D:\devSoftWare\mysql-8.0.17-winx64下新建my.ini文件,文件内容如下:::[mysqld]#skip-grant-tables# Remove leading # and set to the amount of RAM for the most im......原创 2019-11-15 17:46:32 · 168 阅读 · 0 评论