Create EVENT event_test_name ON SCHEDULE EVERY 1 MINUTE STARTS '2010-09-02 12:10:15' ON COMPLETION NOT PRESERVE ENABLE
DO
SET Total=-1;
SET Total = (SELECT COUNT(0) FROM schema1.table1);
SELECT Total;
IF Total >50000 THEN
insert into schema2.table1 (column1)
select schema1.table1.column1 from schema1.table1;
end if;
This is the event scheduler i am writing for mysql, but i keep getting incorrect syntax line near if statemnet, any help will be highly helpful.
Thanks.