1

I would like to remove the number 6 from the column access (type json) without knowing its array location.

Example access row 1: [1, 2, 3, 4, 5, 6, 7, 8, 9]


CREATE TABLE example (
    id int NOT NULL AUTO_INCREMENT,
    access json NOT NULL,
    PRIMARY KEY (id)
);

INSERT INTO `example` (`access`) VALUES ('[1, 2, 3, 4, 5, 10, 20, 30]');

SELECT * FROM `example`;

SELECT JSON_SEARCH(`access`, 'one', '30') from `example`;

The JSON_SEARCH doesn't return any results.

1 Answer 1

0

You've probably moved on but should anyone else find themselves in the same position as I, trying to search arrays of integers... JSON_SEARCH doesn't support the function.

https://bugs.mysql.com/bug.php?id=79233

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.