How to create index on sub-documents in Json data type in MySQL server?
I know we have to create a generated column from the base table and then need to index that column Virtually or stored.
But I want syntax for creating a generated column for sub-document.
JSON columns, like columns of other binary types, are not indexed directly; instead, you can create an index on a generated column that extracts a scalar value from the JSON column. See Section “Secondary Indexes and Generated Virtual Columns”, for a detailed example.