![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
mysql
xiaohenew
用心学,用心看。
展开
-
mysql数组分割成多列
CREATE TABLE sub_array (testName VARCHAR(30) DEFAULT NULL) ENGINE=INNODB DEFAULT CHARSET=utf8;– 分割函数DROP FUNCTION IF EXISTS func_sub ;DELIMITER //CREATE FUNCTION func_sub(f_name VARCHAR(1000),f...原创 2018-10-15 11:51:06 · 3661 阅读 · 0 评论 -
mysql 统计一天24小时数据默认补0SQL
mysql 统计一天24小时数据默认补0SQLselect a.click_date,ifnull(b.count,0) as countfrom (SELECT 0 as click_dateunion allSELECT 1 as click_dateunion allSELECT 2 as click_dateunion allSELECT 3 as click_date...原创 2019-01-23 15:19:38 · 2045 阅读 · 0 评论 -
mysql 统计一周数据默认补0
mysql 统计一周数据默认补0select a.click_date,ifnull(b.count,0) as countfrom (SELECT curdate() as click_dateunion allSELECT date_sub(curdate(), interval 1 day) as click_dateunion allSELECT date_sub(curda...原创 2019-01-23 15:21:26 · 641 阅读 · 0 评论 -
mysql定时任务删除表
mysql定时任务删除表查看event是否开启 : SHOW VARIABLES LIKE ‘%event_sche%’;将事件计划开启 : SET GLOBAL event_scheduler = 1;将事件计划关闭 : SET GLOBAL event_scheduler = 0;关闭事件任务 : ALTER EVENT eventName ON COMPLETION PRESERVE...原创 2019-01-23 15:24:46 · 760 阅读 · 0 评论