postgreSql聚合函数row_to_json初使用

时间:2017-07-04 19:13:21   收藏:0   阅读:1806

把一行数据按Json字符串形式返回

select row_to_json(  table_code)from table_code

select array_to_json( array_agg(row_to_json(code))) from ( select 子查询) 

 

原文:http://www.cnblogs.com/langlang-ndx/p/7117772.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!