xxxxxxxxxx
DELIMITER //
CREATE TRIGGER Before_Update_Record
BEFORE UPDATE ON Employee
FOR EACH ROW
BEGIN
-- Add your logic here for handling updates before they are applied to the table.
-- For example, you can log the changes in the Log_Details table.
-- OLD.Name will give you the current value of the Name column before the update.
-- NEW.Name will give you the new value of the Name column after the update.
-- You can perform custom actions here based on your requirements.
END;
//
DELIMITER ;
xxxxxxxxxx
DELIMITER //
CREATE TRIGGER Before_Delete_Record
BEFORE DELETE ON Employee
FOR EACH ROW
BEGIN
-- Add your logic here for handling deletions before they are applied to the table.
-- For example, you can check for dependencies or perform custom actions.
-- You can use OLD.Name to access the value of the Name column in the row being deleted.
END;
//
DELIMITER ;