i have the update version mysql as
select version()
return 10.4.11-MariaDB
I able to create json type table but not able to create indexing in mysql
CREATE TABLE `players` (
`id` INT UNSIGNED NOT NULL,
`player_and_games` JSON NOT NULL,
`names_virtual` VARCHAR(20) GENERATED ALWAYS AS (`player_and_games` ->> '$.name') NOT NULL,
PRIMARY KEY (`id`)
);
i run this command its return
1 queries executed, 0 success, 1 errors, 0 warnings
Query:
CREATE TABLE `players` (
`id` INT UNSIGNED NOT NULL,
`player_and_games` JSON NOT NULL,
`names_virtual` VARCHAR(20) GENERATED ALW...
Error Code: 1064
You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '>> '$.name') NOT NULL,
PRIMARY KEY (`id`)
)' at line 4
Execution Time : 0 sec
Transfer Time : 0 sec
Total Time : 0 sec
I also used mysql offical documentation it also return the same issue.