select array_to_string(
array(select quote_literal("HD_Code") from "public"."Hosp_Dept" where "HD_Code" in ('103001','103002','103') and "HD_SFMJ" is True), ';'
) as strs;
--------quote_literal
'103002';'103001'4
select array_to_string( array(select quote_ident("HD_Code") from "public"."Hosp_Dept" where "HD_Code" in ('103001','103002','103') and "HD_SFMJ" is True), ',' ) as strs; --------quote_ident "103002","103001"
标签:分隔,103001,103002,逗号,HD,PG,quote,array,select From: https://www.cnblogs.com/usegear/p/17133226.html