json_remove mysql 1

json_remove mysql

mysql> SET @j = '["a", ["b", "c"], "d"]';
mysql> SELECT JSON_REMOVE(@j, '$[1]');
| JSON_REMOVE(@j, '$[1]') |
| ["a", "d"]              |

Here is what the above code is Doing:
1. The first line sets the variable @j to a JSON array.
2. The second line uses the JSON_REMOVE() function to remove the second element of the array.
3. The third line displays the result.

Similar Posts