Automatic execution using mysql event timing
BEGIN
set @table_name = concat('p', DATE_FORMAT(DATE_ADD(NOW(),INTERVAL 1 DAY),'%Y%m%d'));
set @max_value = DATE_FORMAT(DATE_ADD(NOW(),INTERVAL 1 DAY),'%Y%m%d');
set @excutesql = CONCAT('ALTER TABLE TITLE ADD PARTITION (PARTITION ',@table_name,' VALUES LESS THAN ("',@max_value,'"))');
SELECT @excutesql;
PREPARE stmt from @excutesql;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
END
Read More:
- Oracle creates a job and executes the stored procedure with parameters regularly
- Mysql Flashback Warning: C:\Program Files\MySQL\MySQL Server 8.0\bin\mysql.exe
- [Solved] MYSQL Command Execute Error: Can ‘t connect to local MySQL server through socket ‘/tmp/mysql.sock ‘(2) “
- [Solved] ERROR 2002 (HY000): Can’t connect to local MySQL server through socket’/var/lib/mysql/mysql.sock’ (2)
- MySql Install Error: Can‘t connect to local MySQL server through socket ‘/tmp/mysql.sock‘
- How to Solve can‘t connect to local mysql server through socket ‘/var/lib/mysql/mysql.sock‘
- ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/tmp/mysql.sock’
- MYSQL Insert Data Error: check the manual that corresponds to your MySQL server version for the right syntax
- MySQL Install Error: MySQL error 1042: Unable to connect to any of the specified MySQL hosts
- (Fixed) workbench MySQL Error Code: 2013. Lost connection to MySQL server during query
- MYSQL 5.7 Error Code: 1290. The MySQL server is running with the –secure-file-priv option so it..
- mac brew install mysql ‘/tmp/mysql.sock’ (2) [How to Solve]
- How to Fix MySQL ERROR 1130 (HY000): Host ‘XXXX’ is not allowed to connect to this MySQL server
- [Solved] Django configures MySQL Error: NameError: name ”_MySQL ‘is not defined
- MYSQL Enter password:ERROR 2003 (HY000): Can‘t connect to MySQL server on ‘localhost:3306‘
- [Solved] CentOS installs MySQL and starts MySQL with error 2002 (HY000)
- Remote connection to MySQL database error: is not allowed to connect to this MYSQL server solution
- [Solved] MYSQL Error: ERROR! MySQL server PID file could not be found!
- host ‘‘ is not allowed to connect to this mysql server Connect MYSQL Error
- How to Solve MYSQL Error: Failed to start MySQL 8.0 database server