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);
 

 

Guess you like

Origin blog.csdn.net/x18094/article/details/120192655