subquery - MySQL: sub query returns more than one row -
i need delete rows responses table after questions table has been updated error: sub query returns more 1 row. there way around working?
create trigger delete_responses after update on questions each row begin if new.active != old.active delete responses option_id = ( select option_id options question_id = old.question_id);
change =
= any
or in
:
create trigger delete_responses after update on questions each row begin if new.active != old.active delete responses option_id in ( select option_id options question_id = old.question_id);
Comments
Post a Comment