SELECT
GROUP_CONCAT(t1.region_name,t2.region_name,t3.region_name) AS address
FROM
( SELECT * FROM sys_region WHERE region_level = 1 ) AS t1
INNER JOIN ( SELECT * FROM sys_region WHERE region_level = 2 ) AS t2 ON t2.region_parent_id = t1.region_id
INNER JOIN ( SELECT * FROM sys_region WHERE region_level = 3 AND region_id = #{id}) AS t3 ON t3.region_parent_id = t2.region_id
示例sql文件地址:https://github.com/april-projects/init-data/blob/main/sys_region.sql
标签:region,t2,sys,拼接,mysql,省市区,WHERE,id,SELECT From: https://www.cnblogs.com/mobaijun/p/16962187.html