I want to update list status which is in list table according to task status which is in task table, both the table have listid as common field if all taskid task status is 1 then change the list status to 1 if all taskid taskstatus is not 1 then change the list status to 0 below is the trigger. i am getting sql syntex error, please let me know what is wrong
DROP TRIGGER IF EXISTS tada.list//
CREATE TRIGGER tada.list
AFTER INSERT ON tada.task
FOR EACH ROW
BEGIN
UPDATE list t1 , task t2 SET t1.liststatus = t2.taskstatus FROM list t1 , task t2 WHERE t1.taskid = t2.taskid;
END//