kev_m kev_m - 1 year ago 75
MySQL Question

Two queries in one SQL event

hi i have this sql event

enter image description here

now i want to add this query to this event

INSERT INTO leave_records (ID_NUM, TYPE, ADDITIONAL, DATE) SELECT tbl_leave.ID_NUM, 'VL/SL', '1.25', CURDATE() FROM tbl_leave WHERE tbl_leave.STATUS = 'On'

both of the queries run perfectly..

but the problem is i have this error,

enter image description here

when i am putting the two queries together in this one event. i tried to run one query at a time from this event and everything works fine. but i need this two queries run at the same time..

Answer Source

Try splitting your queries with semicolon EDIT: Try adding BEGIN and END like: