时间:2022-12-06 19:00
mysql中存储json格式数据的方法
具体方法如下:
#新建表
createtablejson_user(uidintauto_increment,
datajson,
primarykey(uid)
);
#插入数据
insertintojson_uservalues(null,'{
"name":"lison",
"age":18,
"address":"enjoy"
}');
insertintojson_uservalues(
null,
'{
"name":"james",
"age":28,
"mail":"james@163.com"
}');