Hi
I am new to Trigger. I write trigger to insert total no.of row of a table to another table in this way
CREATE TRIGGER count_row
AFTER INSERT ON main_table
FOR EACH ROW BEGIN
INSERT INTO row_count_table (after_insert) (SELECT COUNT(*) FROM main_table);
I don't know what is the wrong in this statement while I tried to end this statement with END; also.
I am new to Trigger. I write trigger to insert total no.of row of a table to another table in this way
CREATE TRIGGER count_row
AFTER INSERT ON main_table
FOR EACH ROW BEGIN
INSERT INTO row_count_table (after_insert) (SELECT COUNT(*) FROM main_table);
I don't know what is the wrong in this statement while I tried to end this statement with END; also.
Comment