mysql 5.7以上版本json類型字段

// key打雙引號可支持中文

兩種查詢方式:

  • select * from sample_data where task_id=233 and data->'$."City"' = "Galle"
  • select * from sample_data where task_id=233 and JSON_EXTRACT(data,'$."書名"')="網絡生活預防知識讀本"
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章