I have two tables, one parent and one child table. Child will have many rows for parent_id. Both table has status column. Possible values are Active and Deleted.
I want to do this. If for a parent id all children have Deleted status, have to mark parent also as Deleted from Active status. Can it be done in single update query?
Thanks in advance.
How about something like this?