Comments - JSON_SEARCH

3 years, 11 months ago Erik Thauvin

This works differently than in MySQL. For example:

SELECT json_field WHERE JSON_SEARCH(json_field, 'all', 'foo');

works in MySQL. In MariaDB, you should use:

SELECT json_field WHERE JSON_SEARCH(json_field, 'all', 'foo') IS NOT NULL;
 
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.