![](https://img-blog.csdnimg.cn/20201014180756930.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
mysql
lijunen2008
这个作者很懒,什么都没留下…
展开
-
mysql计划任务
灭掉慢查询的存储过程 delimiter //DROP PROCEDURE IF EXISTS kill_low_query;create PROCEDURE kill_low_query()BEGINDECLARE processid INT;DECLARE done INT DEFAULT 0;DECLARE cur CURSOR FOR SELECT id fro原创 2012-12-28 09:10:10 · 320 阅读 · 0 评论 -
mysql存储过程光标的使用
delimiter //drop PROCEDURE IF EXISTS curdeom;create PROCEDURE curdeom()BEGINDECLARE i INT DEFAULT 0;DECLARE done INT DEFAULT 0;DECLARE weibonum,userid INT;DECLARE cur1 CURSOR FOR SELECT原创 2012-12-28 09:13:23 · 813 阅读 · 0 评论 -
mysql存储过程执行动态sql
delimiter //drop PROCEDURE IF EXISTS attentBatch;create PROCEDURE attentBatch(userid INT,num INT)BEGINDECLARE self_tab_index INT;DECLARE done INT DEFAULT 0;DECLARE tabindex INT;DECLARE f原创 2012-12-21 11:10:24 · 480 阅读 · 0 评论 -
mysql存储过程预处理(动态sql)
delimiter //DROP PROCEDURE IF EXISTS test_prepare;create PROCEDURE test_prepare(userid INT,weibonum INT,msgnum INT)BEGIN# 预处理的语句可以是文字字符串或是用户变量SET @sqlstr = CONCAT("insert IGNORE INTO user_co原创 2012-12-21 11:16:24 · 974 阅读 · 0 评论