【发布时间】:2019-03-20 17:24:03
【问题描述】:
我试图从 mysql 数据库中的 json 列中提取一些 json 数字并将它们保存到另一个 double 类型的列中
我的sql语句是
update city
set Population = Info
where (
select CAST(JSON_UNQUOTE(JSON_EXTRACT(Info, '$.Population'))as DECIMAL)
);
但我不断收到此错误:
错误:3156:第 1 行的信息列中 CAST 到 DOUBLE 的 JSON 值无效
Info 列是 json 类型,Population 是 Double 类型
【问题讨论】: