mysql查詢語句陣列下標擷取

windy1012發表於2024-05-07

#["廣東省","汕頭市","龍湖區"]
SELECT a.`register_address` AS 工商地址,a.`dismantle_address`,
REPLACE (dismantle_address->'$[0]','"','') AS 省
,REPLACE (dismantle_address->'$[1]','"','') AS 市
,REPLACE (dismantle_address->'$[2]','"','') AS 區
FROM `optimus_pevc`.`project_business` a ORDER BY a.id DESC;

相關文章