Reputation: 9
I wanna make tringger, so after inserting data, the datas ordered by date (here name 'tanggal')
but got error #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ORDER BY tanggal ASC; END' at line 5
DELIMITER $$
CREATE TRIGGER sort_by_tanggal
AFTER INSERT ON laporan_bukubesar
FOR EACH ROW
BEGIN
ALTER TABLE laporan_bukubesar ORDER BY tanggal ASC;
END $$
DELIMITER ;
Upvotes: 0
Views: 168