oracle、postgresql两行数据合并成一行

postgresql(pg)两行数据合并成一行

select string_agg (cust_attr_type_id,',' order by cust_attr_type_id)  from attr_type icat  where req_id ='123';

 

oracle 

select wm_concat(col2) from t_table where col2 in(660001641,660001642);
 

猜你喜欢

转载自blog.csdn.net/x18094/article/details/120192655