MySQL modify and transfer selected tables