首页 > 数据库技术 > 详细

提取postgresql数据库中jsonb列的数据

时间:2016-12-28 19:34:27      阅读:276      评论:0      收藏:0      [点我收藏+]
SELECT t.* FROM person, jsonb_to_record(info) AS t(num text, name text, score text) WHERE person.id=1;

SELECT t.errmsg,sms_records.*  FROM sms_records, jsonb_to_record(result_json) AS t(errmsg text,sid text)


select tb_result.errmsg,* from ( select t1.*,t2.account_type,t2.account_name 
,t3.report_status,t3.errmsg,t3.user_receive_time,t3.description
 from sms_records t1 
left join accounts t2 on t1.account_id = t2.id 
left join sms_status t3 on t1.sid = t3.sid ) t, jsonb_to_record(result_json) AS tb_result(errmsg text,sid text)
where 1=1

 

提取postgresql数据库中jsonb列的数据

原文:http://www.cnblogs.com/ShaYeBlog/p/6230399.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!