There is a table channels in which there is a column users json

[ { "date": "2019-04-14", "user": 630184594 }, { "date": "2019-04-14", "user": 345344594 } ] 

It is necessary to remove the element in which user = 630184594

Try so

 SELECT JSON_REMOVE(users,'$.user') = "630184594" AS 'Result' FROM channels 

But the item is not removed.

  • This is a new format in mysql, for example, I receive data like this: SELECT * FROM channels WHERE currentAmount <finalAmount AND JSON_CONTAINS ( users , JSON_OBJECT ('user',% s)) - Ivan Chernoknizhnikov 10:48 pm
  • Well, for example, here database.guide/… . Sleka I do not understand the question - Ivan Chernoknizhnikov
  • Yes, there is a solution in which the element index is already known, but I do not know its index - Ivan Chernoknizhnikov
  • Any errors? Perhaps it will not work without an index, but not sure. - And

0