CONCAT(IFNULL(t1.CITYNAME,''),IFNULL(t1.AREANAME,''),IFNULL(t1.STREETNAME,''),IFNULL(t1.ADDRESS,''))addressDetail
Because the mysql concat function will return null if one of the fields appears null
, so this needs to use the ifnull function.
CONCAT(IFNULL(t1.CITYNAME,''),IFNULL(t1.AREANAME,''),IFNULL(t1.STREETNAME,''),IFNULL(t1.ADDRESS,''))addressDetail