Subquery returns more than 1 row - MySQL
问题 UPDATE `pams_faker_lead_location` SET `location` = ( SELECT location FROM pams_leads WHERE pams_leads.location_id = pams_faker_lead_location.id ) I dont know when i run the query in Mysql , this error occur. #1242 - Subquery returns more than 1 row anyone can help me solve the problem ? 回答1: This query: SELECT location FROM pams_leads WHERE pams_leads.location_id = pams_faker_lead_location.id gives you more than 1 row. You must change something because if you need update value you need