mysql SUBSTRING_INDEX

478 查看

SELECT hi.houseCode,SUBSTRING_INDEX(hi.houseCode,'-',1) AS lou,SUBSTRING_INDEX(SUBSTRING_INDEX(hi.houseCode,'-',2),'-',-1) AS men,SUBSTRING_INDEX(hi.houseCode,'-',-1) AS fang FROM houseinfo hi