-- 创建MYSQL事件
DELIMITER $
CREATE EVENT IF NOT EXISTS event_deldata
ON SCHEDULE EVERY 1 MINUTE STARTS '2023-04-21 00:00:00' ON COMPLETION PRESERVE
COMMENT '测试'
DO
BEGIN
-- Drop table
drop table if exists tmp_czc;
-- Create table
create table if not exists tmp_czc (id int,etl_dt timestamp);
-- Insert data
insert into tmp_czc select 1 as id,now() as etl_dt;
END$
DELIMITER ;
-- 查看事件
show EVENTs;
select * from information_schema.events limit 10\G
标签:tmp,00,--,MYSQL,事件,czc,table
From: https://www.cnblogs.com/chenzechao/p/17341245.html