- 具体就是将字典表左联两次,起不同别名。b,c
SELECT
b.name as "区",c.name as "街道",a.*
FROM
tbl_xx a
LEFT JOIN dic_zonecode b ON a.district = b.code
LEFT JOIN dic_zonecode c ON a.street = c.code
SELECT
b.name as "区",c.name as "街道",a.*
FROM
tbl_xx a
LEFT JOIN dic_zonecode b ON a.district = b.code
LEFT JOIN dic_zonecode c ON a.street = c.code
道可道,非常道;名可名,非常名。 无名,天地之始,有名,万物之母。 故常无欲,以观其妙,常有欲,以观其徼。 此两者,同出而异名,同谓之玄,玄之又玄,众妙之门。