How to remove a number from MySQL's JSON array?
问题 If I have a MySQL table with a JSON column called numbers and a record that has [1, 2, 3] in that column (array of integers), how do I update that record to remove the 2 (so it becomes [1, 3] )? 回答1: I was searching for an answer my self and came to this question, not wanting to use objects I continued the search. But I found a solution, you need to use a combination of json_remove and json_search The following removes the value 1 from the table tbl and the column numbers UPDATE tbl SET