update Post set status = 3 WHERE status = 1; delete from post_category where not exists (select id from post p where p.id = Post_id)