Gunakan pemicu SEBELUM:
DELIMITER $$
CREATE TRIGGER test_table_trigger
BEFORE INSERT ON test_table
FOR EACH ROW BEGIN
SET NEW.`user` = CONCAT(NEW.`user`, NEW.id);
END $$
DELIMITER ;
Dokumentasi:Pemicu MySQL
Gunakan pemicu SEBELUM:
DELIMITER $$
CREATE TRIGGER test_table_trigger
BEFORE INSERT ON test_table
FOR EACH ROW BEGIN
SET NEW.`user` = CONCAT(NEW.`user`, NEW.id);
END $$
DELIMITER ;
Dokumentasi:Pemicu MySQL