为什么json的函数无法使用?
create table user ( uid int auto_increment, data json,primary key(uid))engine=innodb;
insert into user values (NULL, “{“name”:”David”,”mail”:”jiangchengyao@gmail.com”,”address”:”Shangahai”}”);
insert into user values (NULL,”{“name”:”Amy”,”mail”:”amy@gmail.com”}”);
select jsn_extract(data, “$.name”),jsn_extract(data,”$.address”) from user;
create table user ( uid int auto_increment, data json,primary key(uid))engine=innodb;
insert into user values (NULL, “{“name”:”David”,”mail”:”jiangchengyao@gmail.com”,”address”:”Shangahai”}”);
insert into user values (NULL,”{“name”:”Amy”,”mail”:”amy@gmail.com”}”);
select jsn_extract(data, “$.name”),jsn_extract(data,”$.address”) from user;
解决方案
20
json_extract 不是jsn