Rewrite data removing from tables