MySQL/JSON

来自康健生活
Kangkk​(留言 | 贡献)2022年9月14日 (三) 09:10的版本 (创建页面,内容为“== 标题文字 == 判断 json 内部是否存在某值。 <syntaxhighlight lang="mysql"> select * from ( select thf.team_id, thf.user_id, thf.create_at fro…”)
(差异) ←上一版本 | 最后版本 (差异) | 下一版本→ (差异)

标题文字

判断 json 内部是否存在某值。

 select * 
  from (
    select thf.team_id, thf.user_id, thf.create_at from md_team_history thf 
    where thf.message -> '$.user' IS NOT NULL
  ) tmp