postgresql
鱼7
这是个人简述
展开
-
Postgresql 9.3.0 修改 JSON 字段中的数据
【删除 json 字符串 other_info 中字段 price 的描述“元/元起”】-- 为避免误删其他字段内的“元/元起”,使用正则只处理 price 与下一个 key (nextKey)之间的数据WITH t as( SELECT id ,replace(other_info , substring(other_info,'"p...原创 2019-11-19 17:07:35 · 967 阅读 · 0 评论 -
Postgresql 9.3.0 向 JSON 字段追加数据
-- 向 json 字符串 other_info 中追加数据WITHt AS (SELECTid ,"replace"(other_info ,substr(other_info,length(other_info)-10,11) ,substr(other_info,length(ot...原创 2019-11-19 16:55:55 · 1400 阅读 · 0 评论