-
create EVENT createMtpulseTable ON SCHEDULE every 1 month STARTS CURRENT_TIMESTAMP DO CALL pro_createTable(); CREATE PROCEDURE pro_createTable() BEGIN DECLARE str VARCHAR(500); -- set @str=‘create table‘; set str= CONCAT(‘create table mtpulse‘,DATE_FORMAT(CURRENT_DATE(),‘%Y%m‘),‘(id INT not NULL auto_increment,PRIMARY KEY(id))‘); SET @sqlstr=str; PREPARE stmt from @sqlstr; EXECUTE stmt; deallocate prepare stmt; END;
相关文章
- Mysql 定位执行效率低的sql 语句
- MyBatis学习(三)、动态SQL语句
- UVA_1025_A_Spy_in_the_Metro_(动态规划)
- mysql5.7安装配置,常用命令,常见问题
- MySQL缓存机制详解(一)
- [MySQL FAQ]系列 — processlist中哪些状态要引起关注 解决mysql cpu过高问题
- 如何对动态的图象进行局部放大或缩小?
- "Last_IO_Error: Fatal error: The slave I/O thread stops because master and slave have equal MySQL server UUIDs
- 《MySQL高级篇》十四、多版本并发控制
- PHP MySQL从半径用户的位置获取位置