MySQL中間變量的用法 SET @countries=(SELECT GROUP_CONCAT(DISTINCT countrys) FROM gui_web_region_info); INSERT INTO gui_web_action_info SELECT '2013-04-16', package_name, country, 'gui_i000', using_count FROM gui_web_total_using_info, (SELECT DISTINCT country FROM gui_web_action_info WHERE INSTR(@countries, country)>0 AND LENGTH(country)=2) b;