当前位置: 代码迷 >> 综合 >> mysql 常用函数date_format,解析日期,json_extract,解析json
  详细解决方案

mysql 常用函数date_format,解析日期,json_extract,解析json

热度:95   发布时间:2023-10-17 19:52:20.0

1.date_format,解析日期

DATE_FORMAT(ei.create_date,'%y-%m-%d') date

2.json_extract,解析json

SELECT
    json_extract( t.ext, '$.*' ),
    json_extract( t.ext, '$.system' ) AS "system",
    json_extract( t.ext, '$.user' ) AS "user" ,
    json_extract( t.ext, '$**.user' ) AS "user2" 
FROM
    sys_user  t;

  相关解决方案