Answers for "before delete trigger mysql"

SQL
0

before delete trigger mysql

DELIMITER $$

CREATE TRIGGER trigger_name
    BEFORE DELETE
    ON table_name FOR EACH ROW
BEGIN
    -- statements
END$$    

DELIMITER ;
Code language: SQL (Structured Query Language) (sql)
Posted by: Guest on May-07-2022
0

mysql trigger to delete old data

SET GLdelimiter //
create event if not exists clean_old_records
on schedule every 1 week
do
begin
 delete from your_table_name 
 where 
 Timestamp < date_sub(curdate(),interval 1 month) ;
end; //
delimiter ;OBAL event_scheduler = ON;
Posted by: Guest on February-09-2021

Code answers related to "before delete trigger mysql"

Code answers related to "SQL"

Browse Popular Code Answers by Language