select id,(select json_extract((select t.wx_profile from table_name1 t1 where t1.id = t.id),'$.sex')AS sex) sex,(select json_extract((select t.wx_profile from table_name1 t1 where t1.id = t.id),'$.city')AS city) city,(select json_extract((select t.wx_profile from table_name1 t1 where t1.id = t.id),'$.openid')AS openid) openid,(select json_extract((select t.wx_profile from table_name1 t1 where t1.id = t.id),'$.nickname')AS nickname) nickname,(select json_extract((select t.wx_profile from table_name1 t1 where t1.id = t.id),'$.province')AS province) province
from table_name t
Mysql将表中json内容的列转成当前表的普通列原json格式目标显示方式SQL实现原json格式目标显示方式SQL实现select id,(select json_extract((select t.wx_profile from table_name1 t1 where t1.id = t.id),'$.sex') AS sex) sex,(select json_extract((select t.wx_profile from table_name1 t1 where t1.id