DELETE FROM user_settings WHERE setting_name = 'affiliation' INSERT INTO user_settings (user_id, setting_name, setting_type, setting_value, locale) SELECT u.user_id, 'affiliation', 'string', u.affiliation, s.primary_locale FROM users u, site s