Filter result with JSON keys
Filters with JSON keys. In this example the result will be filtered with
number
and
issue_date
keys of
document_details
column
SELECT *
FROM students
WHERE 1 
    AND JSON_EXTRACT(document_details, '$.number') = 8
    AND JSON_EXTRACT(document_details, '$.issue_date') = '2020-05-18'
ORDER BY id DESC
by Valeri Tandilashvili
4 years ago
MySQL
JSON
1
Pro tip: use ```triple backticks around text``` to write in code fences