mysqlで既に登録されている値を置換して再登録 Nov 6, 2019 REPLACE を利用する。 update users, ( select id from users where name regexp ' ' ) as having_spaces set name = REPLACE(name, " ", "") where users.id = having_spaces.id